2015-09-23 07:58 AM
2015-09-23 10:15 AM
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?2015-09-24 04:42 AM
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 :(2015-09-24 05:19 AM
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.2015-09-24 05:28 AM
[double post, courtesy of the crappy forum software]
2015-09-24 05:29 AM
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. JW2015-09-24 06:01 AM
/**
* @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);
}
2015-09-24 06:43 AM
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 unavailabilityDescription
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
2015-09-24 09:56 AM
> Another strange thing: the bits in BYPSHAD RTC_CR not seen on the window of the RTC registers.
Bits
? 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
2015-09-24 12:59 PM
>> 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.