This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

migration from cortext-M3(sam3s) to Cortex-M4(sam4s)

Hi all,
I've got a project using Atmel's SAM3S8B I've just found about SAM4S and cortex-M4 and I chose SAM4S8B to migrate to.

But I've got no result after a few days of trying to port the project.
The debug boards are designed by myself and was working for SAM3S with no problem. Sam4s series are PIN to PIN compatible with SAM3s

Questions:
I was positive even the SAM3S binary file(X.bin output of fromelf.exe) will be downloaded to SAM4S and run with no problem but it won't!
Is there any problem with the hardware or the binary should be compiled for SAM4S?

Trying to debug the SAM4S configured project:
The software runs, SPI works, IO is ok but trying to write to internal flash fails!
The behavior is: after copying the buffer to the address of internal flash in order to call IAP for writing to occur, checking the content of that address shows only 0xFF values.
calling IAP function with Clear Lock Bit command before coping to buffer and calling IAP with Erase with program function succeeds returning 1 as the status.
even trying to copy a piece of memory to a local buffer in the same function which calls IAP gives the same result. The destination buffer is full of oxFF. making the buffer global solved this issue. but I still can't copy to internal flash buffer and perform IAP