RTC component and dsPIC33FJ128GP802
Posted: Tue Dec 19, 2017 11:02 am
Hi,
I have FC7 Professional updated to the latest version 7.3.0.5 (19.12.2017).
The RTC component is version 2.0.
I use dsPIC33FJ128GP802 with internal oscillator (FRC) + PLL for CPU and an external crystal 32.768Khz attached to the SOSC pins for RTCC.
Below is a test program, which does not work for me.
The data and time is set as I want, but seems there are no clock, nothing changes.
I look at the data on PC with a serial monitor software using UART of the PIC and a TTL-USB converter.
Do I need to make more RTC register settings in a C code? If yes, what exactly?
I expected that all the necessary settings to take place automatically in Initialization Macro, but it seems not.
Could you please help to debug and find the problem?
P.S. Using the same hardware and code written with the CCS C compiler, everything works fine, and then we may assume there is a (missing) setting problem in Flowcode. Below is the C code used with CCS.
I have FC7 Professional updated to the latest version 7.3.0.5 (19.12.2017).
The RTC component is version 2.0.
I use dsPIC33FJ128GP802 with internal oscillator (FRC) + PLL for CPU and an external crystal 32.768Khz attached to the SOSC pins for RTCC.
Below is a test program, which does not work for me.
The data and time is set as I want, but seems there are no clock, nothing changes.
I look at the data on PC with a serial monitor software using UART of the PIC and a TTL-USB converter.
Do I need to make more RTC register settings in a C code? If yes, what exactly?
I expected that all the necessary settings to take place automatically in Initialization Macro, but it seems not.
Could you please help to debug and find the problem?
P.S. Using the same hardware and code written with the CCS C compiler, everything works fine, and then we may assume there is a (missing) setting problem in Flowcode. Below is the C code used with CCS.