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

Is there hook funcitons in softdevice for application?

Hi : I have problems ,for gpiote interrupt hanlder can be hanged up by softdevice. In normal use ,I should pull up sck pin of my private ADC chip for less than 10us and then pull it down. But as handler is hanged up ,the sck pin can keep high for more than 60us , it makes my private ADC chip reboot.

I use radio notification to avoid interrupt handler to be hanged up ,but the smallest time for notification is 800us .It seems too long,because the whole operation in gpiote handler is less than 200us.

For i just want to clear sck pin , if it keeps high when softdevice takes control of the processor core. Is there simple solutions for me except radio notification? Is there system hook funciton can be use to excute my very simple code ?

Parents Reply Children
  • Did you ever use nrf_delay_us in your gpio interrup handler?

  • Hi, what do you mean by GPIO handler? I thought it's just output operation in your case (assuming your "private ADC chip" is having nRF5x GPIO line as input) so just timing not interrupts (because no input hence no way to trigger some interrupt). If not then please elaborate.

  • It's just opposite. It's a 24-bit ADC chip, 3 pins (data ready,sck,sda)used for retrieving data from torque sensor. data ready pin triggers interrupt to my NRF51422. In handler i pull up sck pin ,then read 1 bit data from sda pin ,then pull down sck pin . pull down and pull up operation is supposed to keep special time according to chip specificiton, so i use nrf_delay_us to accomplish it. But pull up time is limted to less than 60us,otherwise ADC chip will restart automatically. So,if softdevice hangs up my handler when sck pin is high and handler is in delay operation . The sck may keep high for more than 60us ,then my ADC chip restarts. In this case ,when handler continues to excute ,I get wrong data this time .

  • Oh so you are running SPI in application FW instead of using HW peripheral block? And you are having problems to run it during BLE connection? That's unfortunately expected. We have plaid with this and managed to do SPI slave work in SW even with S110 stack running GAP Peripheral connection, but we have failed to implement TWI (I2C) slave in SW on nRF51, it was not reliable during BLE connection...

Related