STM32L471RG HardFault

General discussion on mikroBasic PRO for ARM.
Post Reply
Author
Message
Dorina
Posts: 3
Joined: 06 Apr 2018 08:58

STM32L471RG HardFault

#1 Post by Dorina » 06 Apr 2018 09:56

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
Attachments
OSC2.PNG
OSC2.PNG (45.8 KiB) Viewed 1872 times
OSC1.PNG
OSC1.PNG (47.01 KiB) Viewed 1872 times
HardFault.PNG
HardFault.PNG (29.91 KiB) Viewed 1872 times

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: STM32L471RG HardFault

#2 Post by filip » 13 Apr 2018 09:41

Hi,

Please, can you attach your project here ?

Regards,
Filip.

Dorina
Posts: 3
Joined: 06 Apr 2018 08:58

Re: STM32L471RG HardFault

#3 Post by Dorina » 14 Apr 2018 16:18

Hi,

Please find attached my project.

Best Regards,
Levente
Attachments
STM32L471RG.zip
(241.32 KiB) Downloaded 94 times

Dorina
Posts: 3
Joined: 06 Apr 2018 08:58

Re: STM32L471RG HardFault

#4 Post by Dorina » 19 May 2018 20:16

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

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: STM32L471RG HardFault

#5 Post by filip » 25 May 2018 13:49

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.

Post Reply

Return to “mikroBasic PRO for ARM General”