Content originally posted in LPCWare by tdrazich on Sun Feb 07 08:19:19 MST 2016
I am working with the SPIFI peripheral on an LPC1857 and integrating with an RTOS. I am using the S25FL032P flash device, for data storage and executing from the MCU internal flash. When erasing and writing the flash device, I wanted to have the peripheral perform the polling of the WIP bit within the flash device so that the calling thread could be blocked (rather than spinning and polling) until the SPIFI interrupt occurs. I've used the POLL bit within the command register and it appears to work, but I've noticed that while the peripheral is polling the flash device, the SysTick interrupt does not occur. Once the peripheral polling completes, the SysTick resumes. I don't think it has anything in particular to do with the SysTick, that's just how I noticed that nothing else is happening while the SPIFI is polling the device. It behaves as though the CPU is being stalled until the polling completes.
Any explanation for why this happens? Does the SPIFI stall the CPU while it is polling a device?