Page 2 of 2

Re: Using ChibiOS's I2C driver standalone

Posted: Fri May 05, 2017 5:30 am
by e_l_tang
Actually it seems that I spoke too soon. I am using the following spinlock to wait for the hardware to do its job, but the loop simply goes on forever. Any ideas on why this might be?

Code: Select all

while (TWCR & 1 << TWIE)
        ;

Re: Using ChibiOS's I2C driver standalone

Posted: Sat May 06, 2017 5:37 pm
by e_l_tang
Yeah, trying to use the driver before enabling interrupts is really going to help. I can't believe how long it took to find that bug.