NordicPlayground / nRF51-multi-role-conn-observer-advertiser

Runs an Observer or Advertiser role (timeslot API) with a Connection. Provides a HCI interface to the Observer and Advertiser. Advertiser provides SCAN REQs back to application.
42 stars 25 forks source link

periph_ppi_clear(...) clears all bits in NRF_PPI->CHEN #4

Closed agren closed 10 years ago

agren commented 10 years ago

I believe line 211 https://github.com/NordicSemiconductor/nRF51-multi-role-conn-observer-advertiser/blob/dbfe605d26c17b28a859504d878b7b68735decdd/btle_hci/advertiser/ts_peripheral.c#L211 is incorrect. NRF_PPI->CHENCLR |= (1 << ppi_ch); will cause all bits in NRF_PPI->CHEN to be cleared. It should be changed to NRF_PPI->CHENCLR = (1 << ppi_ch); to work as desired.

The same goes for periph_ppi_set(...)

trond-snekvik commented 10 years ago

I just pushed a fix for this issue, thank you for the feedback.