How to transfer data from the SRAM to the DDR in a kernel module?
Hello,
I am working on a project that acquires ADC readings and saves them into a buffer in the M4 side of STM32mp157 chip on DK2 board, now I need to build a kernel module that copies the saved buffer from the SRAM to DDR on the A7 side when a certain interrupt is triggered.
As I am a beginner in embedded linux world I am wondering about the way to do this, I tried memcpy() at first but errors arise when inserting the module (Can't page virtual address error), I also tried converting the SRAM address from physical to virtual before memcpy() but that didn't work as well.
Is there a direct way to copy data between the memories like memcpy() or do I need to use DMA from the kernel module to copy the data, if the DMA is the way, sharing an example would be great.
Thanks
