Maxim 1-wire with ChibiOS

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

matis
Posts: 53
Joined: Fri Jul 01, 2011 1:46 pm

Re: Maxim 1-wire with ChibiOS

Post by matis »

I'm also developing a bit banged 1 wire interface on my F103VET6 on pin PB8 (SDIO_D4).

I used the code posted by CheBuzz on 12 Dec 2011 04:26. Is this the "best" way to bit bang a 1 wire interface?

Edit; Question:
tickDelay(int tick)
One tick do represent 5uS of wait.

tickSleep(int tick)
Does tick represent a 5uS wait or 1uS?

I guess the first :)

Edit 2; I can't get the GPT3 to work. The gptp->state is equal to GPT_STOP, where it expects / requires to be GPT_READY. I already changed the chBSemReset to set the semaphore as taken.
Possible solution; It seems like it that, in tickSleep(), the gptStart(&GPTD3, &gpt3cfg); is forgotten. Adding that, fix the debug assertion :)
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: Maxim 1-wire with ChibiOS

Post by alex31 »

Jacon wrote:Considering problems described in above posts, Maxim recommends another
(but uncoventional :) ) solution for 32bit MCUs in their own AppNote:

http://www.maxim-ic.com/app-notes/index.mvp/id/214

It's definitely worth to try, especially using our Chibi UART driver with
DMA & properly sized buffers 8-)



I just have begin such a job, no tested intensively, but it works for my needs
i have posted code and information in the «user project» forum.

http://forum.chibios.org/phpbb/viewtopic.php?f=8&t=713

Alexandre
Post Reply