SDMA script to read UART Rx Buffer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDMA script to read UART Rx Buffer

Jump to solution
1,574 Views
qommes
Contributor I

Hi,

for my master thesis I work with the MX6 Quad SABRE AI CPU Card, and I try to program the ARM Cores bare metal using the Freescale SDK.

Now I would like to program the SDMA Core by my own, writing and loading own SDMA Scripts.

The bootload script works fine and I can load my script code into the SDMA RAM. There, it can be triggered internally (from the ARM Core) and externally (from UART4).

The problem is now, that reading the data from the UART 4 FIFO via the peripheral DMA doesn't work. After I configure the UART 4 via the ARM Core, the SDMA should wait for the external trigger (RX FIFO Watermark level = 1Byte). Than the following script is executed:

stf   r7, 0xC3     # write r7 (UART4 RX FIFO Adress = 0x021F0000) to PSA, frozen 32 bit

ldf   r6, 0xC8     # read PD to r6

done 4              # end of script

After execution the source fault flag (SF) is set and register 6 shows the error code 0x0820. I've had a look at Chapter Central Security Unit in the reference manual and I saw that the SDMA maby has no access rights.

- Why does this happen and what does the error code mean? -> Where do i get more detailed informations?

- Could it be that the CSU blocks the SDMA -> Where do I get the information how to configure the CSU?

Can anybody help me with that problem?

Labels (2)
0 Kudos
Reply
1 Solution
1,070 Views
qommes
Contributor I

Ok, I solved it by my own.

The Central Security Unit does not cause this error. The Problem ist that the AHP 2 IP Bridge also controlls the acces to peripherals.

To solve this, set the Master Privilege Level of the SDMA to 0x77 and the Off-Platform Peripheral Access Control Register to 0x00.

Now my script works...

View solution in original post

0 Kudos
Reply
2 Replies
1,070 Views
dauphinalexandr
Contributor II

Hi ,

I'm curently looking for writing and loading my own SDMA Scripts. 

How did you manage to compile your scripts  ?

And to load the script code into the SDMA RAM ,  you wrote your own bootload script or you used SDK functions ?

thanks in advance,

Alexandre,

0 Kudos
Reply
1,071 Views
qommes
Contributor I

Ok, I solved it by my own.

The Central Security Unit does not cause this error. The Problem ist that the AHP 2 IP Bridge also controlls the acces to peripherals.

To solve this, set the Master Privilege Level of the SDMA to 0x77 and the Off-Platform Peripheral Access Control Register to 0x00.

Now my script works...

0 Kudos
Reply