Project

General

Profile

Actions

Bug #5478

closed

usb stack doesn't reset properly after an OSMO_ASSERT()

Added by lynxis about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
firmware
Target version:
-
Start date:
03/04/2022
Due date:
% Done:

100%

Spec Reference:

Description

When an OSMO_ASSERT() happens the firmware doesn't do the USB init correct.
The remsim client will fail with LIBUSB_TRANSFER_STALL when setting configuration.
It can be recovered by call 'R' via serial.

The differences between the assert() and 'R' via serial are:

- 'R' calls USBD_Disconnect() which assert() doesn't.
- assert() will run into a `while(1);` loop

assert()

=============================================================================
SIMtrace2 firmware 0.8.1.20-8680, BOARD=owhw, APP=cardem
(C) 2010-2019 by Harald Welte, 2018-2019 by Kevin Redon
=============================================================================
-I- Chip ID: 0x28900960 (Ext 0x00000000)
-I- Serial Nr. XXX
-I- Reset Cause: software reset (processor reset required by the software)
-I- USB init...
USBD_Init
?       ?       help
        R       reset SAM3                                                                                                                               

'R' serial

=============================================================================
SIMtrace2 firmware 0.8.1.20-8680, BOARD=owhw, APP=cardem
(C) 2010-2019 by Harald Welte, 2018-2019 by Kevin Redon
=============================================================================
-I- Chip ID: 0x28900960 (Ext 0x00000000)
-I- Serial Nr. XXX
-I- Reset Cause: software reset (processor reset required by the software)
-I- USB init...
USBD_Init
SetAddr(11) -W- Sta 0x8880C [0] -W- _ -W- Sta 0x888A8 [0] -W- _ -W- Sta 0x888A8 [0] -W- _ SetCfg(1) cfgChanged1 -I- calling configure of all configurations...
-I- calling init of config 1...
-E- Somebody forgot to call sim_switch_init()
-I- Modem 0: physical SIM
-E- Invalid SIM0
-I- Modem 1: physical SIM
-E- Invalid SIM1
-I- entering main loop...
-I- USB is now configured
Actions #1

Updated by lynxis about 2 years ago

  • Description updated (diff)
Actions #2

Updated by lynxis about 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 80
Actions #3

Updated by lynxis about 2 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 80 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)