Using ChibiOS's I2C driver standalone

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

Moderators: utzig, 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

Postby e_l_tang » Fri May 05, 2017 5:30 am

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

Postby e_l_tang » Sat May 06, 2017 5:37 pm

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.


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 11 guests