some misunderstanding on test board based on STM32F030RCT6
Hi. i have some problem when verifying the board composed of STM32F030RCT7 with Keil IDE (MDK ARM). I still don't know much about FW, so I ask a few stupid questions.
Problem 1. I am basically setting the project through STM32CubeMX. I checked that the option of [Set All free pins as analog] in the Code Generator of the Project Manager reduces the power consumption. I checked the [Debug Serial Wire] option. With these two settings, I found that the power saving option is checked and debugged as desired, but I don't understand one thing. In the Keil project setting, the reset after flash option is used among the Debugger options, and the timer that should be output every 1 second after uploading the firmware is output at a speed faster than 1 second. If you press the button connected to the RST, the output is normally every 1 second from then on. I am wondering why this is happening.
Problem 2. Currently, 4 ADCs and 6 GPIO Outs are to be used. ADC tries to use 12 ~ 15 as DMA, GPIO uses PA 9 ~ 12, PB2, PB4. At this time, if one of the GPIO pins is HAL_GPIO_WritePin (SET), the HAL_ADC_ConvCpltCallback function is called like crazy. if (hadc-> Instance == ADC1) is not filtered by this code. Could I have misinterpreted the datasheet when the pins are affecting each other? If you don't use GPIO, it works as intended.
// HAL_GPIO_WritePin(STATUS_LED_GPIO_Port, STATUS_LED_Pin, GPIO_PIN_SET); // if i active this code, call HAL_ADC_ConvCpltCallback serveral time.
int main(){
while (1)
{
if(isReadyReadAdc)
{
HAL_ADC_Start_DMA(&hadc, (uint32_t *)adc_buffer, ADC_DMA_BUF_LEN);
isReadyReadAdc = FALSE;
}
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
}
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
if(hadc->Instance == ADC1)
{
HAL_ADC_Stop_DMA(hadc);
isReadyReadAdc = TRUE;
printf("finish read ADC\r\n");
}
}
Problem 3. Three UART circuits are currently configured. UART1, UART3, UART4. Mirroring function is implemented in Interrupt mode through UART1. However, in the case of UART3 and UART4, looking at STM32CubeMX to enable the Interrupt function, there was an option called "UART3 to UART6 global interrupt" where the Intterupt option should be. I tried to ignore it, the callback function was not called because it implements mirroring function like UART1. So, how to implement mirroring function for UART3 and UART4?
Thanks for reading the long text.
