Hello!
Basically, after power-on, I am carrying out PBIST tests on "L2 RAM", "PBIST ROM", "STC1 ROM", "STC2 ROM", "VIM RAM", "MibSPI RAM", "DCAN RAM" and finally "DMA RAM" which are all getting succeeded.
Post these tests, I am performing tests like SCI loopback, SPI loopback on all the SCI/SPI modules present on RM57 microcontroller. Finally, I am performing the DMA test which is basically as follows:
"Declare two arrays of size 100 (local variables), one loaded with data from 1 to 100 and the other being empty and initialized with zeros. Aim is to perform DMA transfer from the loaded array to the other array which is empty. Therefore, I use channel 5 (just random), set the control packet with following parameters:
Source Address = Address of array loaded with 1 to 100 elements
Destination Address = Address of Empty Array
Channel Control = 0
Frame Count = 1
Element Count = 100
Element Offset = 0 (both source and destination)
Frame Offset = 0 (both source and destination)
Port Assigned = port A read and port A write
Read Size = 8 bit
Write Size = 8 bit (because both of the arrays declared are of character type = unsigned int8)
TType = Block Transfer
Address Mode Read = Address Increment
Address Mode Write = Address Increment
I am calling the function "dmaSetCtrlPacket(DMA_CH5, above control parameters structure)" and then the "dmaSetChEnable(DMA_CH5, DMA_SW)". Then I am polling the bit 5 of BTCFLAG register to SET so as to indicate the transfer complete activity."
The flag in BTCFLAG register gets SET but I dont see any data in my destination array.
I tried by also bypassing all the tests mentioned above upon power-on and just keeping the DMA test itself but still I dont see any data in the destination array. What is it that I might be missing?
By the way, I am calling the function, "dmaEnable()" right after power-on and before performing the test.
Regards,
Chetan.