2015-12-19 03:58 AM
Hi,
I am using Nucleo board and Keil 5. I am using cubemx to configure the nucleo (STM32F103Rxx). My doubts are1. if i configured USART then, do i need to configure the pins (for USART) manually in code?2. If i configure USRAT then, can i use interrupt which are already defined? #nucleo #!stm32-!cubemx2015-12-19 06:18 AM
1) The initialization code produced by MX for the UART will configure all pins according to the settings you specify.
2) Not sure I understand this. MX generates stubs for the interrupts which call into library functions. The library functions issue callbacks to your application. I don't recall if MX produces stubs for the callbacks or if you have to figure that out yourself. Then you just need to use the _IT() version of the API calls to read or write the UART.2015-12-19 08:21 AM
Thanks.
i have one more doubt on timer setting in cubemx.There is setting called slave mode. what is slave mode option? i have attached the screen shot of the same. ________________ Attachments : cubemx_doubts.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hto2&d=%2Fa%2F0X0000000aX9%2FeISwhvJPXYL9TDFUnkYX0.Wqf4qJCL0wh.RjUqVAGM0&asPdf=false2015-12-22 02:45 AM
Hi hobb.epy,
As indicated in (section 14.3.19-TIMx and external trigger synchronization)''The TIMx timer can be synchronized with an external trigger in several modes..''.So, user can configure one timer as a slave of another master timer (by default, timers are in master mode) according to the value of TIMx_SMCR) register (refer to table-82-TIMx Internal trigger connection).In STM32CubeMx pinout view, enable the ''Slave Mode'' of the timer and enable ''Trigger Source'' with the value that corresponds to the master timer.-Shahrzad-