<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv0436996753"><div id="yui_3_16_0_1_1436237193113_7305"><div id="yui_3_16_0_1_1436237193113_7304" style="color:#000;background-color:#fff;font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div dir="ltr">I am making progress getting nuttx running from flash on the C139 but I suspect I might be running into an issue where when code is trying to store a value into flash memory where nuttx code and data are that nuttx seems to stall/halt, maybe an exception vector is being jumped to by the CPU but nuttx isn't quite setup to handle it just yet.</div><div dir="ltr"><br></div><div id="yiv0436996753yui_3_16_0_1_1436237193113_5447" dir="ltr">Am I right that I would need to unlock flash in order to write even just one byte/word?</div><div id="yiv0436996753yui_3_16_0_1_1436237193113_5458" dir="ltr"><br></div><div dir="ltr"><div>I tried doing the same sequence of writes that are in cfi_flash.c flash_block_unlock() but that seemed to stall as well... maybe I need to do some initialization of some sort? I may try to port over cfi_flash.c|h into nuttx.</div><div><br></div><div dir="ltr">nuttx is loaded into two pages: 0x10000 and 0x20000<br></div></div><div dir="ltr"><br></div><div id="yui_3_16_0_1_1436237193113_7325" dir="ltr">I copied the macros for writew and __arch_putw and did</div><div id="yui_3_16_0_1_1436237193113_7326" dir="ltr">writew(0x60,0x0); // CFI_CMD_PROTECT</div><div id="yui_3_16_0_1_1436237193113_7324" dir="ltr">writew(0xD0,0x10000); // CFI_PROT_UNLOCK</div><div id="yui_3_16_0_1_1436237193113_7318" dir="ltr"><div id="yui_3_16_0_1_1436237193113_7327">writew(0xff,0x0); // CFI_CMD_RESET</div><div class="" id="yui_3_16_0_1_1436237193113_7326" dir="ltr">writew(0x60,0x0); // CFI_CMD_PROTECT</div><div class="" id="yui_3_16_0_1_1436237193113_7324" dir="ltr">writew(0xD0,0x20000); // CFI_PROT_UNLOCK</div><div class="" id="yui_3_16_0_1_1436237193113_7318" dir="ltr"><div class="" id="yui_3_16_0_1_1436237193113_7327">writew(0xff,0x0); // CFI_CMD_RESET</div><div><br></div><div>Seemed to halt at the first write.</div><div><br></div><div>Thanks for any hints, at this point I'm just hacking to try and get things working.</div><div><br></div><div>-Craig<br></div></div></div></div></div></div></div></body></html>