Dear Forum,
I have a question about the CC251X manual section "12.3.2.1 DMA Flash Write" in which figure 22: " DMA Flash Write Executed from within Flash Memory" shows code which triggers the DMA in order to start the flashing.
Important is : "When performing DMA flash write while executing code from within flash memory, the instruction that triggers the first DMA trigger must be aligned on a 2-byte boundary."
Could anybody explain to me what these lines are doing.
-----------------------------------------------------------------------------
; Write flash and generate FLASH DMA trigger
; Code is executed from flash memory
;
#include “ioCC2510.h”
MODULE flashDmaTrigger.s51
RSEG RCODE (1)
PUBLIC halFlashDmaTrigger
FUNCTION halFlashDmaTrigger, 0203H
halFlashDmaTrigger:
ORL FCTL, #0x02;
RET;
END;
---------------------------------------------------------------------
So far I understand is that the RCODE(1) alignes the following code to 2**1=2 byte addresses. This means that the instruction ORL starts word aligned. The used instruction ORL is a "OR immediate data to direct byte" which takes 3 byte in memory. This means that the instruction starts aligned but needs then 3 byte read from flash which stops reading non aligned.
Is this sufficent to meet the requirement being word aligned?
I wonder also what the parameter "0203H" means, I cannot find any hint neither in the IAR assembler nor in the C manual what this parameter is doing at all.
Thanks for any help in advance.
regards
spachner