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


stm32f303rct6 Comparator interruption does not work

Hello!
Please help in setting interrupts. I’ve been tormented for several days. The program does not fall into interruption.

/**
******************************************************************************
* @file main.c
* @author Ac6
* @version V1.0
* @date 01-December-2013
* @brief Default main function.
******************************************************************************

  • /


  1. include “stm32f30x.h”
  2. include “stm32f30x_exti.h”
  3. include “stm32f30x_rcc.h”
  4. include “stm32f30x_gpio.h”
  5. include “stm32f30x_syscfg.h”
  6. include “stm32f30x_dac.h”



void init(void);
unsigned short count=0;

void COMP4_5_6_IRQHandler(void) {
EXTI_ClearITPendingBit(EXTI_Line30);
count++;

}

int main() {
init();
while(1) {
}
}

void init(void) {
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOB, ENABLE);


GPIO_InitTypeDef gpio_init;
gpio_init.GPIO_Mode = GPIO_Mode_AN;
gpio_init.GPIO_PuPd = GPIO_PuPd_NOPULL;
gpio_init.GPIO_Pin = GPIO_Pin_0;
GPIO_Init(GPIOB, &gpio_init);

COMP_InitTypeDef comp_init;
comp_init.COMP_InvertingInput = COMP_InvertingInput_1_4VREFINT;
comp_init.COMP_NonInvertingInput = COMP_NonInvertingInput_IO1;
comp_init.COMP_OutputPol = COMP_OutputPol_NonInverted;
comp_init.COMP_Output = COMP_Output_None;
comp_init.COMP_Hysteresis = COMP_Hysteresis_No;
comp_init.COMP_Mode = COMP_Mode_HighSpeed;
COMP_Init(COMP_Selection_COMP4, &comp_init);
COMP_Cmd(COMP_Selection_COMP4, ENABLE);


EXTI_InitTypeDef exti_init;
exti_init.EXTI_Line = EXTI_Line30;
exti_init.EXTI_LineCmd = ENABLE;
exti_init.EXTI_Mode = EXTI_Mode_Event;
exti_init.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_Init(&exti_init);

NVIC_InitTypeDef nvic_init;
nvic_init.NVIC_IRQChannel = COMP4_5_6_IRQn;
nvic_init.NVIC_IRQChannelSubPriority = 1;
nvic_init.NVIC_IRQChannelPreemptionPriority = 1;
nvic_init.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&nvic_init);
}