2020-11-29 11:47 PM
Under SBSFU, I am able to run my custom application, and everything run fine. But changing the SFU defualt UART.with USB throughing error "USB Device not recognize!!!", I debug through SBSFU code, and USB stack(CDC and Devi ce only Configuration) initialize correctly.
I will highly appreciate for any help.
With regards
Jitu
Solved! Go to Solution.
2020-11-30 01:06 AM
I would suggest to deactivate all the SBSFU security features first ( But I think you already did it)
Have you integrated the USB IRQ call ?
something like
void OTG_FS_IRQHandler(void)
{
HAL_PCD_IRQHandler(&hpcd);
}
and do you see any interrupt ?
If you have some interrupt then you can check the stack status
For a trial, you can also increase the heap size.
2020-11-29 11:57 PM
Hello Jitu,
I would suggest first to validate your USB CDC configuration with a basic application.
You can find a example in the USB MOOC
STM32 USB training - 09.1 USB CDC device basic labs
Once your code is functional, then you can integrate it as SBSFU loader
Best regards,
Frantz
2020-11-30 12:01 AM
Hi Frantz,
Sorry mention that, the UserApp(my custom application) that I have test under SBSFU includes "USB -CDC in device only configuration", and its running with no issues.
With regards
Jitu
2020-11-30 12:09 AM
To integrate your application in the SBSFU you should have relocated your application ( flash base address and vector table relocation).
Have you tested this application relocated in standalone ? No SBSFU in flash and you use your IDE to flash and debug the relocated application.
Best regards,
Frantz
2020-11-30 12:09 AM
To integrate your application in the SBSFU you should have relocated your application ( flash base address and vector table relocation).
Have you tested this application relocated in standalone ? No SBSFU in flash and you use your IDE to flash and debug the relocated application.
Best regards,
Frantz
2020-11-30 12:12 AM
Yes, My application working standalone and also under SBSFU (with new memory mapping) without any issue!!!
With regards
Jitu
2020-11-30 12:24 AM
If you are sure about VTOR update and memory relocation,try to debug your application launched by the SBSFU ( with protection removed) .
Check if you get some USB IRQ , then you can observe the USB stack to understand at which step it get stucked.
2020-11-30 12:36 AM
The problem is not UserAPP side, its on SBSFU side!!!
2020-11-30 12:46 AM
Reading your description, I thought your loader was inside you User App...
Where is located your USB-CDC loader ( inside the SBSFU or inside the User Application ?
2020-11-30 12:50 AM
Ohh..
USB-CDC loader is inside SBSFU, I'm initializing in sfu_boot.c (in function SFU_BOOT_SystemSecurity_Config with "SFU_COM_Init()").