This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF51822 SPI slave semaphore tasks acquire and release

Hello,

I wish to communicate with the chip via SPI NRF51822.

The NRF chip is configured as a slave. Based on the SPi_slave_example code, I can't set to 1 the semaphore task release and task ACQUIRE .

Those tasks are always equal to 0

Is there a particular way to get there?

best regardsimage description

Parents
  • Sorry, I misread your question.

    When you write 1 to any TASK in the nordic chip, it will still read as 0. If you want to see if it has worked or not, you have to look at the events. For example if you write SPI->TASKS_ACQUIRE = 1; Then to see if it worked you have to check if EVENTS_ACQUIRED == 1. If it is set to 1 then do your logic and clear the event by doing EVENTS_ACQUIRED = 0.

Reply
  • Sorry, I misread your question.

    When you write 1 to any TASK in the nordic chip, it will still read as 0. If you want to see if it has worked or not, you have to look at the events. For example if you write SPI->TASKS_ACQUIRE = 1; Then to see if it worked you have to check if EVENTS_ACQUIRED == 1. If it is set to 1 then do your logic and clear the event by doing EVENTS_ACQUIRED = 0.

Children
No Data
Related