I2C SetTimeoutCallback Routine ?

General discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
OVogel
Posts: 3
Joined: 09 Jan 2020 21:06

I2C SetTimeoutCallback Routine ?

#1 Post by OVogel » 09 Jan 2020 21:31

Hi Everybody,

I'm using the IDE microPASCAL/C for dsPIC/PIC24 compiler and build a complex project. My main MCU P24FJ512GB610 with 32 MHz clock drives the mikroe HMI5.0" via 115.2k Baud UART, drives a key controller MCU P16F18346 and a precision clock counter MCU P18F24K40 both via I2C Bus, drives a XBee RF module, drives a Bluetooth module and so so on.

At room temperature everything works fine. When I put the unit in the climate cabinet and drive it at 0 ° C, my unit crashes uncontrollably after 30 minutes or after 5 hours. The main MCU hangs and the whole unit stopped ( I think ) I can't use a watch dog timer function and I can't use the mikroProg debugger because I can not determine if the debugger hangs or the error arrives I'm looking for. The debugger is to crazy. Only a power on reset after this starts my unit normally.

I need a temperature of 0°C because the unit I develop is for outdoor using.

Now I'm searching the problem.

First I thought the HMI5.0 with the FT9x and the FT812 on SPI at 50Mhz SPI clock have a problem with the temperature. If that were the case, the failure would also have occurred with other MCU's. But that's not the case. Read my following testing.

If I use a PIC18F67K40 MCU with 14.7456 MHz clock as main MCU and microPASCAL/C for PIC everything works fine with the same code at 0°C. I thing the I2Cx_SetTimeoutCallback function I use in the 8-bit IDE helps. With the PIC24 IDE I comment the I2Cx_SetTimeoutCallback function with //

Finally I suspect the I2C bus is hanging. I use a bus clock of 100KHz.

My question why have the PIC24 IDE have no I2Cx_SetTimeoutCallback function ?
What can I do to implement this function ?

Best
Oliver

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: I2C SetTimeoutCallback Routine ?

#2 Post by filip.grujcic » 15 Jan 2020 09:12

Hi,

I believe I answered you on the ticket you opened.

Kind regards,
Filip Grujcic

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 General”