cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing UART with USB for SFU. Getting Code 43 error- USB Device not recognize!!!

JChou.1
Associate III

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

17 REPLIES 17

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.

Hi Frantz,

It was SE_EnterSecureMode which was disabling the interrupt before USB stach runs. Solved the issue, now SBSFU running with USB.

Do you think is it efficinet to replace YMODEM protocol with custom protocol ???

As i have to also include CAN in SBSFU for firmware update.

with regards

Jitu

Hello Jitu,

"Do you think is it efficient to replace YMODEM protocol with custom protocol ???"

In the major case, the downloading time is not really an issue ( except in FUOTA case with RF has bandwidth is really low).

Then it's up to your requirement and also the fact you will have to implement your own PC tools for downloading.

Best regards,

Frantz

Ok, thanks

out0f0rder
Associate II

Seems I'm a little too late for the party.

@JChou.1​ Jitu, could you please share some hints regarding replacing UART with USB CDC in the SFU.

I have adapted base SFU for L433CC and now I have doubt if I should go with an additional CP2102 or stick to STM32 CDC for firmware upgrade.

Seems not an easy task to me atm.

Any hints would be greatly appreciated.

Hi,

Yeah, it is difficult!!

I have replaced UART with STM32 USB-CDC and CAN-classic interfaces, and implemented a custom YMODEM protocol both side(PC and Board) to work with new interfaces. The trick is, you need to adopt YMODEM protocol (both side) to replace UART with any other communication interfaces.

Best of luck

Jitu

Sorry for being intrusive. But why customize YMODEM? If you use USB CDC, which is virtually the same UART as plain UART, default YMODEM should be fine. At least it is fine for me with UART only.

Is this because of CAN?

Haven't you, by any chance, shared your work on github or some other places?

Would you mind if I will ask you about this when and if I have issues with that? I expect to finish my hardware prototype in about 2-3 months. I promise to be as shy as possible =)

Yeah, It is virtual UART not UART!!!

Sorry its company work .