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

TWI/S110 "issue" vs nRF51822 hardware revision

Hi, 

1.

I feel really stupid as I cannot make any sense of any of the information found in Product Specification (v3.3), or the online Compatibility Table or past forum messages (most with dead links anyway) ... things like "QFAC Ax0" (x in [0..9]) does not match mine which says "QFACA1".

=> Anyway, could anyone tell whether "N51822 QFACA1 1627ET" is a first revision chip?

2.

reading through the forum, it seems that first revision chips had an issue when running both TWI and SD (S110) concurrently due to common usage of PPI[0]; there are multiple versions of the twi_hw_master.c file going around. I have tried many variants (mostly SHORTS and sd_ppi_channel_assign() based) but the bluetooth connection systematically disconnects when the firmware tries to update the i2c/twi attached RTC. Note that outside any active BT connection, the communication to the RTC works well. Note also that I use SDK6.1.0 + SD110_7.3.0 (and there is no way around that :/ )

=> Could someone attach here the version that will work? 

thanks in advance for your support.

Parents Reply Children
  • - when receiving a BLE packet, ble_nus take over and pass to my incoming handler: it receives a command to set clock (6 bytes: 2 header + 4 for clock info): there I foward that value to the rtc(/i2c/twi) to set that time; once this is done; the incoming handler will give a positive/negative response. 

    - when using the loop-variant (sending 8 i2c/twi packet) I get a reason= 0x08 (connection_timeout) on disconnect;

    - when using the move-blob-at-once, things work properly

  • The fact that you see this also if you do the TWI transaction from app context seems strange. The TWI handling should not get in the way of the SoftDevice in that case.

    The only thing I can think of is if you use a high priority for the TWI interrupt and a lot of time is spent in TWI interrupt/event handlers, but the twi_hw_master.c file that is included in SDK 6.1.0 is not interrupt driven. Are you using a different driver that is interrupt driven? If so, what is the priority of your TWI interrupt?

Related