Hi All,
I am trying to develop a PRU driver for I2C on the Beaglebone AI (Ti-am5729). I have some questions about the setup procedure using Interrupt and polling (I am not using DMA). I am not quite sure about the differences between the setup described between section 24.1.5.1.1.1.1 and 24.1.5.1.1.1.2) and the figure (24.19) of the TRM.
1- I am not sure about the value to put for I2C_IRQENABLE_SET (referenced in figure 24.19) I have tried with 0x1f (enable XRDY, RRDY, ARDY, NACK, and AL as they are used later). However, I receive a Kernel Oops when I try to run my code " [Feb26 14:54] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ +0.003725] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
genirq: exiting task "irq/114-4807a00" (110) is an active IRQ thread (irq 114)"
What value should be used to configure the I2C_IRQENABLE_SET?
2- I have tried to write in the I2C_DATA register but reading the register after always gives 0xD. I have checked the value of I2C_IRQSTATUS_RAW, and it always read 0x10 (XRDY). Am I missing something to write the data?
If you want to have a look at my code, it is under this repository https://github.com/PierrickRauby/BBAI-PRU-I2C/blob/main/am572x_pru_i2c_driver.pru1_1.c
Thanks for any help you can provide!
Pierrick
PS: I have posted this same question on the Ti e2e forum a few days ago but I have not solved my issue yet.