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

twi driver rx problems

hello Nordic

i am working with nrf52832, sdk 16.0 , s132 (v7)

i am trying to send and receive data from an nfc reader/writer module (NXP pn7150) 

if i use nrf_delay_ms(100) between each read i don't get a results, which means the buffer i give to nrf_drv_twi_rx returns with 0x00 (which is what i set it to be)

if i use a breakpoint after the first tx and then i go to the nrf_drv_twi_rx i do get some values which are not all 0x00, how come it takes so long? 

also, if i put the breakpoint in the twi event handler for EVENT_DONE case, and i remove the breakpoint befor the nrf_drv_twi_rx, then i don't get an EVENT_DONE, why is that ?

another thing.. checking the nrf_drv_twi_rx request over the SDA with an oscilloscope, i get strange values, first byte is the address and the 0 bit set to 1 but the bytes after that i don't know what's going on .. i would expect to see the size somewhere of 6 bytes in my case but i see a lot of other things.. maybe the problem is there, should it not be all zeros beside the size ?

what's even more stranage to me is that i have almost the same code running fine on another more simple example. the twi_sensor with the NXP part added, works fine but my  app_ble_blinky, after adding relevant code and libs with addition of uart, saadc, pwm, app_timer, does not work the same

best regards

Ziv 

Related