I currently have a Bluetooth system that uses SPIDRV and USARTDRV to handle both the SPI and USART Communications.
Currently, I have been looking into using DMA and the PRS with the other peripherals (I2C, ADC, PWM) and I notice all the examples use the LDMA with the PRS system, not DMADRV. After trying to implement I2C with the LDMA it appears I cant us the LDMA while using any DRV library due to the interrupt call being used in the DMADRV Library.
My use of SPI and USART is simple (SPI to read sensors such as accelerometers and compasses and USART to send and receive bytes) and when I use the SPIDRV and USARTDRV functions I use the blocking functions which I assumed is a simple polled approach (Without using DMA) compared to an async write done using DMA.
Is there any advantage to using the DRV Libraries (SPIDRV and USARTDRV) rather than the direct EMLIB functions and using (When Required) the LDMA and PRS as demonstrated in the examples on GitHub?
I just checked AN1220 and it appears to be Communication using DALI which doesn't seem to be what I'm looking for, Is the Application Note Incorrect?
My main question is there any advantage to using the DRV libraries rather tahn EMLIB Directly? Will I have more control of the peripherals using EMLIB?
The AN1220 is the solution for your description "After trying to implement I2C with the LDMA it appears I cant us the LDMA while using any DRV library due to the interrupt call being used in the DMADRV Library.".
The EMDRV is chip independent so you can easily migrate to other chip with minor changes. For emlib, you need to re-write your program if the hardware block architecture is changed (e.g. uDMA to LDMA). You can find related information in AN0918.0.
If you need more control of the peripherals, you should use emlib since EMDRV can't cover all user cases.
Thanks for the information! It seems that I will need a significant amount of control of the peripherals so it seems better for me to rewrite it using EMLIB and using LDMA and the PRS.
Another question, Are the blocking transmissions inside SPIDRV and USARTDRV done without using DMA?