2017-07-06 12:43 AM
I'm using
STM32F3xx USB full speed device library (UM0424), it works well. And I need SDADC in my project. So I wrote simple test:
start conversion in SysTick every 100ms
void SysTick_Handler(void)
{
if(adc_ready)
{
adc_ready=false;
GPIO_SetBits(GPIOB, GPIO_Pin_7);
SDADC_SoftwareStartInjectedConv(SDADC1);
}
};
//**********************************************************
in SDADC interrupt I send data to debug UART port:
void SDADC1_IRQHandler(void)
{ if(SDADC_GetFlagStatus(SDADC1, SDADC_FLAG_JEOC) != RESET){
if(adc_ready==false) { adc1 = SDADC1->JDATAR; send_Uart(USART2,adc1>>8); adc_ready=true; GPIO_ResetBits(GPIOB, GPIO_Pin_7);//led off } SDADC_ClearITPendingBit(SDADC1, SDADC_IT_JEOC); }}//**********************************************************
and right after usb initialisation in main:
Set_USBClock();
USB_Interrupts_Config(); GPIO_SetBits(GPIOA, GPIO_Pin_15);//usb conn USB_Init();I got garbage in terminal. And I see that conversion time dramatically reduced from about 177 uS to 14 uS.
If I skip USB initialisation ADC works quite well.
And it is impossible to debug USB source because you cant pause usb communication
:(
I'm using Keil IDE.
I attached full Keil project.
2017-07-08 07:59 AM
It's a custom board? Can you show your schematic? Looks not like F373 EVAL board.
Do you consider to refresh your library to CubeF3 1.8.0?
2017-07-08 10:28 AM
Yes, this is my own board. I didnt make sch file because of simplicity. I draw pcb looking at CubeMX pinout.
2017-07-08 10:52 AM
Товарищ,
It's difficult for me to understand you.
You can layout without a schematic?
You are using CubeMX without generating a HAL/LL project, and still using StdLibrary?
In your project, you are still have stm32373c_eval.c without using it.
2017-07-09 04:05 PM
Yes, I can.
I'm using CubeMX just to generate pinout. I don't use HAL.
stm32373c_eval.c is in VirtualComport_Loopback project from
UM0424
ST library. It is in project, but no functions was used, so it can be deleted from project.I downloaded most recent
STSW-STM32121 v4.1.0. No changes - the bug still exist.
Do you have such evalboard?