2016-09-14 03:27 AM
I've try to use HAL_TIM_Base_Start_DMA with TIM6.
To configure the system I'm using STM32CubeMX. We I start the project I can't receive any interrupt...HELP.In Attachment the ioc file.My change after code generation:In red tim.c file modify:#include ''tim.h''#include ''dma.h''/* USER CODE BEGIN 0 */uint32_t aCCValue_Buffer[3] = {10000, 1000, 100};
/* USER CODE END 0 */... /* Peripheral interrupt init */ HAL_NVIC_SetPriority(TIM6_IRQn, 0, 0); HAL_NVIC_EnableIRQ(TIM6_IRQn); /* USER CODE BEGIN TIM6_MspInit 1 */HAL_TIM_Base_Start_DMA(tim_baseHandle, aCCValue_Buffer, 3);
/* USER CODE END TIM6_MspInit 1 */..../* USER CODE BEGIN 1 */void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);}/* USER CODE END 1 */2016-09-14 08:11 AM
Too few information here. How do you configure the timer? Do you enable the DMA? Do you implement the DMA interrupt? What about the DMA configuration?
Post the whole project.2016-09-15 12:38 AM
In attachment the file for initialization.
________________ Attachments : dma.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtfV&d=%2Fa%2F0X0000000aVb%2FDovokb5vvpvDn.aqO9ObACl.1M9zw2Nf5_PMvaK9Pus&asPdf=falsemain.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtlI&d=%2Fa%2F0X0000000aWb%2FYI5uKThwE.unH5mK_81uNVuiJynj2jVH6l3Js3Zf4z4&asPdf=falsestm32f0xx_it.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtlN&d=%2Fa%2F0X0000000aWc%2FHkWB7KoOcqVgQ7nHrs0X5EyWXAIJGxLTzki4Rw4NW9Q&asPdf=falsetim.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtlS&d=%2Fa%2F0X0000000aWd%2Fq7r5XbdKUjtH9iCABCOdyMaCycg1XXsSo.5NMeWvMxs&asPdf=false2016-09-27 01:19 AM
Solution in attachment.
Look the Led on NUCLEO F070RB!! the problem was in the configuration of DMA trasfer using halfword instead of word. ________________ Attachments : main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzUN&d=%2Fa%2F0X0000000bMw%2F1XJNb29OIz8w5Q2b6rW771Gh9p3vaaCBnL0gf_8zxYU&asPdf=falseTestDmaTim.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz7W&d=%2Fa%2F0X0000000bMu%2Fnvopai8XT18Nk5C5rbn86IAE2lxNzIrKyDJlm.lFeE8&asPdf=falsetim.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzU3&d=%2Fa%2F0X0000000bMt%2F2hz0ie8W3nGlruV.N6FoieCw6ERRgbary2mRKW_QTs8&asPdf=false2023-10-09 05:34 AM
dıd npt work wıth me