Other Parts Discussed in Thread: MSP430F5529, Z-STACK, CC2531EMK
Hi everybody,
I've ported ZStack-EXP5438-2.5.1 to a custom platform using a MSP430F5529. Now I'm trying to port the OTA feature to this platform. I have encountered some problem on my way.
I followed the the Z-Stack OTA Upgrade User's Guide.pdf to port the SampleSwitchOta example.
I tried to port the OTA dongle, but it failed since the 5529 does not provide a sufficient flash memory space; 128KB compare to 256KB for 5438. I decided to use the CC2531EMK as OTA dongle (OTA server), which properly works.
I encountered my first problem with the OTA linker file which I have ported to the 5529 reality. The following post talk about it.

I had to add an external memory chip to obtain a sufficient memory space for the downloaded image. So I implemented and integrated an external memory driver. The driver properly works.

I have tried an OTA upgrade with this system, but it failed. The OTA client (MSP430F5529) receives the entire image, but I get the ZCL_STATUS_INVALID_IMAGE error.

The cause of this error is the CRC validation. I do not understand why it occurs. With breakpoints, I have tried to follow the execution and it looks like, when the program reads the OTA preamble into the external memory, that it reads only zero. This is strange because I tested to write and read the external memory with the hal_xnv function, which properly work. Does anyone have an idea?

