2016-10-19 02:08 PM
2016-10-19 04:18 PM
You seem to be using C++/.CPP syntax.
Are you sure your routines are linking? Could you try extern ''C'' in front of your IRQ Handler. Other than that are we sure it is an XE part?TIM_ClearFlag(TIM3, TIM_IT_Update);
// Should be _FLAG_ not _IT_ unrelated to issue
2016-10-20 08:25 AM
Clive,
I think you are on the right track here. Where did you learn this stuff? How could you tell I was using C++? I have the following flags raised in the C/C++ tab:USE_STDPERIPH_DRIVER,STM32F303xE,__CPLUSPLUS__FPU_PRESENT,__FPU_USEDand the ''--cpp'' control under ''Misc Controls''.I researched some, and maybe I'm still using them incorrectly, but I added extern ''C'' linker directives around my interrupt handlers, entire files containing interrupt handlers, and my function prototypes, in all possible combinations I can think of, and now my builds don't go well - even after deleting all ''extern ''C'''' statements and cleaning the target.Now my source files don't build at all. The compiler hardly even tries - it gives up almost instantly. The build output window immediately returns with''error - cannot create command input file 'stm32f303xe\sourcefilename.___i' ''for each of my source files. I think C++ is ruining me here. I see that now.The STM32F303K8T6 is an XE part yeah? That's the startup file that Keil gives me after choosing that device. Maybe it's not an XE part? Great. Now you have me doubting my hardware.I just created a new Keil project and added my relevant sources over and successfully built and ran my stuff. I'm periodically starting ADC conversions in the TIM3 handler and finding my data in the DMA_TC handler. So that's working I guess. Would've been nice to have the timer trigger the ADC directly, but that never worked.It would be nice to know where I went wrong I guess. I plan to use this C++ library in the future. But if using it means that interrupts are no longer a thing, that means I have lots yet to learn. Isn't there a well-written document that shows how to incorporate C++ libraries into your C project? It took me a awhile to find clues about it. But now I'm basically stuck forcing the whole project into C++ which ruins my easy use of printf. Now I'm have to use sprintf and USART_puts(). Yuck.Would you suggest that I re-write my C++ library into a C library? I'm very tempted. It's not like I need multiple instances of the objects made available in the class.Any general thoughts on this? What would you do?Thanks for your help Clive. I know this is only a forum, so I greatly appreciate it.