Using ChibiOS's I2C driver standalone

ChibiOS public support forum for topics related to the Atmel AVR family of micro-controllers.

Moderator: tfAteba

e_l_tang
Posts: 33
Joined: Sun Jul 03, 2016 7:58 pm
Been thanked: 2 times

Re: Using ChibiOS's I2C driver standalone

Post 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)
        ;
e_l_tang
Posts: 33
Joined: Sun Jul 03, 2016 7:58 pm
Been thanked: 2 times

Re: Using ChibiOS's I2C driver standalone

Post 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.
Post Reply