Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Timer interrupt error.

Hello,

I’m tring to reset a LED register with a timer (TIM4) interrupt, but TIM4_IRQHandler(void); fucntion it’s never launch, the code that i’m using is: (mi board es STM32f429I-DISC1).

Some one can help me please?

Thank you very much for your attention

JPorte.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  1. include “stm32f4xx.h”


TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;

void INTTIM_Config(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);
TIM_TimeBaseStructure.TIM_Period = 10 - 1;
TIM_TimeBaseStructure.TIM_Prescaler =84 - 1;
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);
TIM_ITConfig(TIM4, TIM_FLAG_Update, ENABLE);
TIM_Cmd(TIM4, ENABLE);

NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_SetPriority(TIM4_IRQn, NVIC_EncodePriority(4,15,0));

NVIC_EnableIRQ(TIM4_IRQn);
NVIC_Init(&NVIC_InitStructure);

}

int main(void) {

GPIO_InitTypeDef GPIO_InitDef;

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG, ENABLE);

GPIO_InitDef.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_14;
GPIO_InitDef.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitDef.GPIO_OType = GPIO_OType_PP;
GPIO_InitDef.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitDef.GPIO_Speed = GPIO_Speed_100MHz;
//Initialize pins
GPIO_Init(GPIOG, &GPIO_InitDef);
GPIO_SetBits(GPIOG, GPIO_Pin_13 | GPIO_Pin_14);

INTTIM_Config();

while (1) {

}

}

void TIM4_IRQHandler(void)
{
GPIO_ResetBits(GPIOG, GPIO_Pin_13 | GPIO_Pin_14);

if (TIM_GetITStatus(TIM4, TIM_FLAG_Update) != RESET)
{
TIM_ClearFlag(TIM4, TIM_FLAG_Update);
GPIO_ResetBits(GPIOG, GPIO_Pin_13 | GPIO_Pin_14);
}
}

Hi , Joaquim

Inside your code, you never start the timer.
You need to start it in your main function.

Best Regards
Souleymane (AC6-Training)