We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I use a MCBSTM32E evaluation board, which is composed of an STM32F103ZET6 MCU, and I loaded the measure example provided by Keil. It works perfectly, but I want to add another variable resistor on PC13 which is the channel 13 of ADC1. The onboard variable resistor is connected to channel 14. Thus I configured the ADC to work with two channels (13 & 14), the DMA to have a buffersize of 2 and created an int ADC_ConvertedValue2 that should contain the second conversion result. I configured the channels like underneath : ADC_RegularChannelConfig(ADC1, ADC_Channel_14, 1, ADC_SampleTime_55Cycles5); ADC_RegularChannelConfig(ADC1, ADC_Channel_13, 2, ADC_SampleTime_55Cycles5);
My result is that each conversion result is store on the same variable (ADC_ConvertedValue) and the second one has nothing. I dont know how to get the value of the second conversion in the EOC interruption routine. Can I still use this interruption and do i have to use a DMA one ? I'm a bit confused about how ADC channels really works and neither the datasheet nor the FWLib helped me. Thanks in advance for any hint. Gary
I come back to say that my problem is solved. It was a mistake which came from a bad example. In fact, I had put DMA1_Channel1_IRQHandler() as the prototype. It did not generate any error during compilation, but the true one is DAMChannel1_IRQHandler(). Now the DMA works perfectly. But I have a new problem which is more hardware in fact. I "cannot acces memory" when trying to load my program. I think I know why it doesnt work anymore (probably because I used the pins A which are the JTAG one). How can I reset the whole thing ?
Hello Gery Bisson,
I am not shure if this will help but you can try to use Serial Wire Debug port instead of JATG.
If you are using a ULINK2/ULINK-ME than change the settings in uVision for Ulink Cortex Debugger. In Cortex-M Target Driver Setup check SWJ and set port to SW. If this works you will see under SW Device a IDCode. Please see also www.keil.com/.../ulink2_ctx_jtag_adapter.htm.
Best Regards, Martin Guenther
Thank you. I did not know what was the SWJ, now I do. But I encountered the same problem. I think it is each time the Cortex is in sleep mode (I cannot access memory). I tried my infinite loop without the __WFI() instruction and now I can load my programs easily.
Several processors will drop the JTAG support when sleeping. The sleep turns off clocking to too large sections of the processor, making it inert until it receives an interrupt.