Part Number: AM62A7
Other Parts Discussed in Thread: SYSCONFIG
Hi,
I want to utilize R5F MCU in the AM62A7 to capture sensor data. Due to the number of sensors, frequency of data sampling and arrival, I want to do as much as possible in hardware without occupying the CPU.
One sensor is required to be sampled regularly at high frequency (3.6kHz) over SPI, triggered by an external source on a GPIO pin. The data collected is processed at 18 sample intervals and copied to a shared memory space. This sensor is attached to the Main Domain SPI0 channel but is cross-domained to R5F control, as the same with the triggering GPIO pin. Since SPI0 belongs to the Main Domain, it should have DMSS functionality.
My idea is to have GPIO event to trigger DMA Tx/Rx of 32 words of 16-bit. After 18 of such events, DMA triggers a completion interrupt that notifies a task to process the data to be copy to shared memory space.
However, I'm quite confused by the setup. From what I understood, I should be using PKTDMA to communicate with SPI0, using the PSI-L thread IDs (instead of registers). I see that Sysconfig GUI tool allows me to created an instance of PKTDMA device but the auto-generated code doesn't seem create PKTDMA channel handler variable for me to use to setup TRPD to chain transfers. Unfortunately, there doesn't seem to be examples of PKTDMA, only BCDMA.
Is what I want to do possible in the R5F? If so, is there a guide or example of this?