This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TWI SW setting the frequency rate ( cant find )

Hello!

Looking around and reading a bunch of posts, I found little information on how to initialize the TWI sw frequency, which currently is 100 kHz( calculated it with a test). Is there are way to init the Frequency rate for the TWI software ? Setting the frequency rate manually, on the HW version is easy.But what about the SW version , is the TWI always on 100kHz? Regards, Volkan

  • Since the SW version uses bit-banging it doesn't really make any sense to "init the frequency rate". The change on the GPIOs happens as fast as the processor is able to process the code. So, a factor that determines the speed is how well the code is optimized.

    In twi_master.h you have a NRF_DELAY() definition, which is used some places in the twi_sw_master.c code. You can try to set this to 1us. Or maybe remove it completely.

Related