This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Swrc117 flash_dma.c example,please some help



Hi experts ,sorry if it sound old fashioned,but we still work with cc1110f32 SoC in our university in Slovenia, We managed to work  to test the scrw117 example app for writing flash  How i can change in the example below the  static const char data[] and the static const char writeCheck[] by simple uint16 data and uint16 writeCheck (without array) and finnaly copying that data back    .... and made it work. we stuck on it Its there some special tricks and adjust values for the DMA registers??  Tunned it somehow to fit the uint16 variables? We tryed hundred combinations and we can not made it work Here is the example,if someone edit it please,and leave it for reading (IAR settings are ok,large,model,cc1110 selected and the example runs fine,i tell it because others stuck on it for long time)
  • Hello,

    Unless you have some very special condition, you can change your uint16 to char data[]. 

    You can shift your data[0] = uint16 yourData >> 8, data[1] = unit16 yourData  (there is a HI(yourData), LO(yourData) define statement)

    You can use the _ltoa() if you want a string value representation of your number. ( taken from OSAL.c but can be found elsewhere)

    Or you can use the memcpy() function.

    Thanks,