[RESOLVED]I can't modifie an main.c file after first compilation
Hello everyone,
My first problem is corrected, (GPIO and TIM library from home STM), after successfully compile and load the programmeTIM_PWM_output, I have tried to change the “main.c” in order to adapt it to my needs. In the loop “while (1) {}” contained in “int main (void)”, i added this:
/*On commence à jouer au con
* -Cablage:
* - TIM2_CH1 : PA.5 (Arduino A4) -->REDLED
- TIM2_CH2 : PA.1 (Arduino A1) -->GREENLED
- TIM2_CH3 : PA.2 (Arduino A7) -->BLUELED
- TIM2_CH4 : PA.3 (Arduino A2) -->
* */
/*On commnce par faire varier la led rouge
* avec les #define PULSEx_VALUE
* On les remplacera par des fonctions d’ incrémentaions par la suite
* */
sConfig.Pulse = PULSE1_VALUE; HAL_Delay(2000);
sConfig.Pulse = PULSE2_VALUE; HAL_Delay(2000);
sConfig.Pulse = PULSE3_VALUE; HAL_Delay(2000);
sConfig.Pulse = PULSE4_VALUE; HAL_Delay(2000);
I have wanted to create a new file.bin, but it doesn’t work, there is there a manipulation to force SW4STM32 so that the modified program is taken into account?
In fact, the IDE does not try to recompile.
If you have tracks to point me, I’d be happy
EDIT:
I forgot to specify that I commented the following lines:
/* Set the pulse value for channel 1 */
// sConfig.Pulse = PULSE1_VALUE;
// if (HAL_TIM_PWM_ConfigChannel(&TimHandle, &sConfig, TIM_CHANNEL_1) != HAL_OK)
// {
/* Configuration Error */
// Error_Handler();
// }