Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Enthusiaser
Level 1
Level 1
5 replies posted 10 questions asked 25 sign-ins

Hello

I need guidance to implement RTC for TC375Lite kit, there is section 49.11 in datasheet .

But i am not able to implement it.

Can u guys guide me on How to implement the RTC? 

 

Thanks and Regards

0 Likes
1 Solution
David_R
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 sign-ins

Hi @Enthusiaser 

To be able to understand i'd recommend read the SRC part in the user manual part 2, page 3187, section 49, once you know the theory then you can understand the code, 

Let's take for example the initialization function, line 64 into the Cpu0_Main.c file

 

IfxScr_init(1);

 

The prototype for this function is

 

void IfxScr_init(uint8 boot_mode);

 

If you take a look at the user manual then you'll find the different boot modes

David_R_1-1709050485868.png

In this case it's using the User Mode 1 (User code in XRAM), so that's the reason to move the code to the XRAM

 

IfxScr_copyProgram();

 

Now regarding to the coding, let's take for example

 

PMS_PMSWCR4.U |= (0x0 << 6) | (0x1 << 25) | (0x1 << 24);

 

If you take a look at the register description, page 961, then you will find the register,

In this case the bits 24 (BPSCR_EN) and 25 (SCREN) is one, and the bit 6 (SCRCLKSEL) is zero 

David_R_0-1709053360473.png

The drives has comments to help you to understand what's going on,  for example

 

void IfxScr_init(uint8 boot_mode)
{
    PMS_PMSWCR4.U |= 0x3 | (boot_mode << 16);
    while(!PMS_PMSWSTAT.B.SCRST);   /* Wait for SCR to be reset. */
    PMS_PMSWSTATCLR.B.SCRSTCLR = 1; /* clear reset status */

    /* The scr should have booted up by now and give us status 0x80 */
    while(PMS_PMSWCR2.B.SCRINT != 0x80);
}

 

Finally, the Readme.md lead you thru the entire example.

Regards! :1

View solution in original post

0 Likes
5 Replies
David_R
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 sign-ins

Hello @Enthusiaser 

If you could please tell me which board are you using?,

what kind of problem are you facing?, also, if you could share the code you are using it'll be helpful, 

Finally if you are in need of a RTC you can achieve it following this training Infineon-STM_System_Time.

Regards! :1

0 Likes

I am using evaluation board for TC375lite kit. i am referring the demo code. iLLD_TC37x_ADS_SCR_Blinky_LED_LK_1 from code example. it is implemented with SCR, i am not able understand the code also where RTC is implemented.

Could u please help me in this?

 

 

0 Likes
David_R
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 sign-ins

Hi @Enthusiaser 

To be able to understand i'd recommend read the SRC part in the user manual part 2, page 3187, section 49, once you know the theory then you can understand the code, 

Let's take for example the initialization function, line 64 into the Cpu0_Main.c file

 

IfxScr_init(1);

 

The prototype for this function is

 

void IfxScr_init(uint8 boot_mode);

 

If you take a look at the user manual then you'll find the different boot modes

David_R_1-1709050485868.png

In this case it's using the User Mode 1 (User code in XRAM), so that's the reason to move the code to the XRAM

 

IfxScr_copyProgram();

 

Now regarding to the coding, let's take for example

 

PMS_PMSWCR4.U |= (0x0 << 6) | (0x1 << 25) | (0x1 << 24);

 

If you take a look at the register description, page 961, then you will find the register,

In this case the bits 24 (BPSCR_EN) and 25 (SCREN) is one, and the bit 6 (SCRCLKSEL) is zero 

David_R_0-1709053360473.png

The drives has comments to help you to understand what's going on,  for example

 

void IfxScr_init(uint8 boot_mode)
{
    PMS_PMSWCR4.U |= 0x3 | (boot_mode << 16);
    while(!PMS_PMSWSTAT.B.SCRST);   /* Wait for SCR to be reset. */
    PMS_PMSWSTATCLR.B.SCRSTCLR = 1; /* clear reset status */

    /* The scr should have booted up by now and give us status 0x80 */
    while(PMS_PMSWCR2.B.SCRINT != 0x80);
}

 

Finally, the Readme.md lead you thru the entire example.

Regards! :1

0 Likes
cwunder
Employee
Employee
10 likes given 100 solutions authored 5 likes given

In addition to what David_R asked.
Be sure to review the errata sheet in particular  [SCR_TC.021] RTC not counting after reset if P33.10 is high

0 Likes

yes, i will definitely refer the errata sheet

0 Likes