cancel
Showing results for 
Search instead for 
Did you mean: 

RTC sub second register in STM32L151RBT6

ferrarofcf
Associate II
Posted on September 23, 2015 at 16:58

The original post was too long to process during our migration. Please click on the attachment to read the original post.
12 REPLIES 12
Posted on September 23, 2015 at 19:15

And you're using what debugger? Could it just be showing you a subset?

What if you park a ''Memory View'' of the RTC registers rather than a ''Peripheral View'', can you see those registers there?

What exactly are you reading/seeing from the register(s)? And what would that be if it were doing it correctly?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ferrarofcf
Associate II
Posted on September 24, 2015 at 13:42

Thanks for your reply… your posts are the most useful of the forum.

I use IAR 6.5 companion STLINK/V2. 

If I view the memory at address  0x40002828 it is stopped at value 0x1000. (at address  0x40002800 to count correctly the time) 

In effect I read always 4096dec=1000hex and don’t countdown of my synchronous prescaler setting in RTC_PRER register at PERIPH_BASE+ 0x2800+offset 0x10 (PERIPH_BASE=0x40000000) 

my value are:

SynchPrediv = 0x120; /* (37KHz / 128) - 1 = 0x120*/

AsynchPrediv = 0x7F;

I use this routine in stm32lxx_rtc.c to read SSR register.

uint32_t RTC_GetSubSecond(void)

{

  uint32_t tmpreg = 0;

  

  /* Get subseconds values from the correspondent registers*/

  tmpreg = (uint32_t)(RTC->SSR);

  

  /* Read DR register to unfroze calendar registers */

  (void) (RTC->DR);

  

  return (tmpreg);

}

there will be a bug in the die :(

Posted on September 24, 2015 at 14:19

there will be a bug in the die :(

Well as I recall there was a significant design revision in the L15x parts several years back, and there are at least 5 die steppings. May be the part you have doesn't actually have the features you expect. So it would help to determine exactly what you have.

You'd need to provide the full markings on the package, and talk to an FAE or ST representative. You could post here, but there's no guarantee of a response, as it's primarily a user forum.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 24, 2015 at 14:28

[double post, courtesy of the crappy forum software]

Posted on September 24, 2015 at 14:29

Have you tried to set BYPSHAD? Post the RTC registers content.

Changes in silicon in production versions are documented through errata. I don't see any RTC-related erratum for 'L15x.

JW
Posted on September 24, 2015 at 15:01

/**
* @brief Gets the RTC current Calendar Subseconds value.
* @note This function freeze the Time and Date registers after reading the
* SSR register.
* @param None
* @retval RTC current Calendar Subseconds value.
*/
uint32_t RTC_GetSubSecond(void)
{
uint32_t tmpreg = 0;
/* Get subseconds values from the correspondent registers*/
tmpreg = (uint32_t)(RTC->SSR);
/* Read DR register to unfroze calendar registers */
(void) (RTC->DR);
return (tmpreg);
}

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ferrarofcf
Associate II
Posted on September 24, 2015 at 15:43

OK thank you very much.

Another strange thing: the bits in BYPSHAD RTC_CR not seen on the window of the RTC registers.

My project before was all components ST: MCU, Sensor, logic port, Power Supply, bluetooth BlueNRG...

but ST has not interesting to support you, and tells...write on forum, Why? ....you can not expect users to do the work for the ST.

So, I rework my pcb and left only the ST MCU, LSM303D and L3G. About sensors I have asked help on the forum without success :(

Now also MCU problem :(( 

Already I was very worried because in ''CD00278726 Errata sheet'' read:

2.1.2 Bootloader unavailability

 

Description

 

The boot loader can not be used the two issue described in Section 2.1.3: Undefined instruction exception During IAP.

 

Workaround

 

No workaround is available

 

Although actually trying it works (inside proprietary bootloader code at address 0x1FF00000), but I can trust ??? (I took your advice of the magic word in RAM after the reset)

Sorry for the outburst, one my marking code is:

ARM v

 

STM32L151

 

RBT6

 

GH23B  VG

 

CHN GH 419

 

ST

 

Posted on September 24, 2015 at 18:56

> Another strange thing: the bits in BYPSHAD RTC_CR not seen on the window of the RTC registers.

Bit

s

? It's just one bit, namely bit 5 of RTC_CR. If you can't see/change it in the debugger, there is some problem with the debugging software or its settings.

> But ST has not interesting to support you, and tells...write on forum, Why?

Because support is very expensive.

JW

 

Posted on September 24, 2015 at 21:59

>> But ST has not interesting to support you, and tells...write on forum, Why?

>Because support is very expensive.

Indeed, I don't think the engineers deploy at less than $1M/annum in sales. You have to work up your distribution chain first, and their support infrastructure. Places like DigiKey are taking a 50% margin from the ''customer'' to provide some level of front line service.

The forum is Emergency Room Triage, stopping you from bleeding to death in the 5-30 minute time frame, as your fellow engineers apply pressure to the wound, it's not there to manage project staffing issues.

I'm not using L1 parts enough to know if this feature is on all die or not.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..