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

TWIM not achieving 400 kbps

I am using an nRF52832 to talk to a Melexis MLX90393 (which supports 400kpbs Fast Mode) via the TWIM interface. I am using the TWI Manager library to schedule transactions.

When I choose 400kbps for the TWIM frequency, the SCL line does not clock at 400 kHz (period of 2.5 us) as can be seen in the image below. Instead it is clocking at 200 kHz (period of 5 us).

You can see in the image as well that I am indeed setting the correct value for frequency in the configuration struct passed to nrf_twi_mngr_init(). I have also verified that the FREQUENCY register for the TWIM peripheral (located at 0x40003524) does in fact contain the value 0x06400000.

When I choose 250K or 100K for the TWIM frequency, I indeed see the SCL line run at 250 kHz and 100 kHz respectively.

What can I do to get the 400kbps rate.

Parents Reply Children
Related