This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

blocked task for 3 seconds

Hi,

If I want to run a blocked task e.g. write 1MB data to the external flash size 8MB(NVRAM), that it takes 3 seconds. What is the best way to to in NRF 51822?

Do you think we could wrap pstorage for external flash?

For the communication protocol, we use GPIO simulate SPI and yes we use softdevice 1.0.

Thanks.

Paul

Parents
  • Block what? If you are the only user of the CPU you can turn off interrupts and do whatever you want.

    Or is this another 'how do I stop the softdevice interrupting me so I can do precision timing' question, which gets asked a couple of times a week? The answer to that is you cannot, the softdevice wins, it has higher priority than anything you are doing and you can't change that or it will lose timing and it will lose the connection.

    Why are you simulating SPI over GPIO? The chip has an SPI master on it.

    Edit: since you edited your question to say you are using the softdevice the answer remains the same. You can't do it, at all. You can't block for 3s, 3ms or 3us. So you can't bitbang time-sensitive protocols when using BTLE on the nrf51822.

    Why are you not using the SPI master on the chip?

Reply
  • Block what? If you are the only user of the CPU you can turn off interrupts and do whatever you want.

    Or is this another 'how do I stop the softdevice interrupting me so I can do precision timing' question, which gets asked a couple of times a week? The answer to that is you cannot, the softdevice wins, it has higher priority than anything you are doing and you can't change that or it will lose timing and it will lose the connection.

    Why are you simulating SPI over GPIO? The chip has an SPI master on it.

    Edit: since you edited your question to say you are using the softdevice the answer remains the same. You can't do it, at all. You can't block for 3s, 3ms or 3us. So you can't bitbang time-sensitive protocols when using BTLE on the nrf51822.

    Why are you not using the SPI master on the chip?

Children
No Data
Related