Skip to content

Commit

Permalink
Merge pull request #46 from oscarbailey-xmos/fix_rx_error_disabled
Browse files Browse the repository at this point in the history
Fix cases where disabled RxError caused the firmware to crash
  • Loading branch information
xross authored Sep 15, 2020
2 parents dbdf9ad + ce2c3f7 commit d892af8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
lib_xud Change Log
==================

1.1.1
-----

* RESOLVED: Cases where disabling RxError caused firmware to crash

1.1.0
-----

* RESOLVED: Disabled erroneous handling of Rx Error line

1.0.0
-----

Expand Down
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ XMOS USB Device (XUD) Library
Overview
--------

This library is currently in a pre-release state.

lib_xud merges the existing sc_xud and lib_usb (a fork of sc_xud) and replaces them both. It includes an API that supports both previous libraries providing a unified and maintained library going forward.

The XMOS USB Device (XUD) library provides a low-level interface to USB. lib_xud is a software defined, industry-standard, USB library
Expand Down
2 changes: 1 addition & 1 deletion lib_xud/module_build_info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 1.0.0
VERSION = 1.1.1

DEPENDENT_MODULES =

Expand Down
10 changes: 6 additions & 4 deletions lib_xud/src/core/XUD_IoLoop.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright (c) 2011-2020, XMOS Ltd, All rights reserved

// XUD_LLD_IoLoop.S
// Main USB interfacing loop
Expand Down Expand Up @@ -157,8 +157,10 @@ ResetIntHandler:
ldw r10, dp[SavedSp] // Restore stack pointer
set sp, r10

#if 0 // RxError Interrupts Disabled
ldw r11, sp[15] // Put RxE back to events..
setc res[r11], XS1_SETC_IE_MODE_EVENT // Set IE mode back to events
#endif


ResetDetect:
Expand Down Expand Up @@ -311,17 +313,17 @@ ConfigSofJump:
#endif
ConfigSofJump_Done:


ConfigRxErrEventVector:
stw r3, sp[15] // Store flag port to stack
#if 0 // RxError Interrupts Disabled
setc res[r3], XS1_SETC_COND_EQ
setc res[r3], XS1_SETC_IE_MODE_INTERRUPT
ldap r11, Err_RxErr
setv res[r3], r11
ldc r11, 1
setd res[r3], r11 // Set event cond data to 1
stw r3, sp[15] // Store flag port to stack
eeu res[r3]

#endif


SetupSuspendResetTimer:
Expand Down

0 comments on commit d892af8

Please sign in to comment.