Hi Mikroelektronika Team,
Am using Mikro C Pro ARM v6.0
I have problem with mcu STM32L471RG.
My test code is very simple, I only want to blink a LED on port PortC bit13.
Here is my code:
sfr sbit LED at GPIOC_ODR.B13;
int i;
void main()
{
GPIO_Config (&GPIOC_BASE,
_GPIO_PINMASK_13,
_GPIO_CFG_MODE_OUTPUT | _GPIO_CFG_SPEED_MAX | _GPIO_CFG_OTYPE_PP);
Delay_ms(100);
while(1)
{
i++;
if (i > 500)
i = 0;
LED = 1;
Delay_ms(500);
LED = 0;
Delay_ms(500);
};
}
I can't run this code... when I debugging I have the following error message :
HardFault [IPSR=3]
at line 0x04EA 0xE7FE B L___GenExcept28
Here is my oscillator settings:
RCC_CR : $40021000 : 0x00000B60
RCC_CFGR : $40021008 : 0x00000001
RCC_PLLCFGR : $4002100C : 0x00000800
RCC_CSR : $40021094 : 0x00000600
PWR_CR1 : $40007000 : 0x00000200
-HSI16 Oscillator in use without PLL
I have checked power supply and other signals with scope, VDD/VSS VDDA/VSSA, Reset Signal and BOOT0 pin...its all OK.
I have also attached the screenshots of HardFault and oscillator settings.
How can I solve this problem?
Thank You.
Best Regards,
Levente
STM32L471RG HardFault
STM32L471RG HardFault
- Attachments
-
- OSC2.PNG (45.8 KiB) Viewed 1872 times
-
- OSC1.PNG (47.01 KiB) Viewed 1872 times
-
- HardFault.PNG (29.91 KiB) Viewed 1872 times
Re: STM32L471RG HardFault
Hi,
Please, can you attach your project here ?
Regards,
Filip.
Please, can you attach your project here ?
Regards,
Filip.
Re: STM32L471RG HardFault
Hi,
Please find attached my project.
Best Regards,
Levente
Please find attached my project.
Best Regards,
Levente
- Attachments
-
- STM32L471RG.zip
- (241.32 KiB) Downloaded 94 times
Re: STM32L471RG HardFault
Hi Mikroelektronika Team,
My questions about STM32L471RG hardfault are not getting answered.
I posted my question at 06.04.2018.
Please reply to my post.
Thank You.
Best Regards,
Levente
My questions about STM32L471RG hardfault are not getting answered.
I posted my question at 06.04.2018.
Please reply to my post.
Thank You.
Best Regards,
Levente
Re: STM32L471RG HardFault
Hi,
First of all, I apologize for the delayed reply
This seems like a complicated issue thus taking this long to solve, as it affects other families as well.
As soon as I have a solution I will contact you.
Regards,
Filip.
First of all, I apologize for the delayed reply
This seems like a complicated issue thus taking this long to solve, as it affects other families as well.
As soon as I have a solution I will contact you.
Regards,
Filip.