Commit 486e778f authored by Jeffrey Lee's avatar Jeffrey Lee

Fix sticky SD activity LED on Pi 3 B

Detail:
  s/SDIO - Signed counter wrap-around once &80007fff was reached was causing the code to think the activity LED was permanently off, resulting in the code only making "turn on" requests. Calculating the difference as a (signed) 16bit value solves the problem.
Admin:
  Tested on Pi 3 B
  Fixes SD activity LED being stuck on after e.g. letting Verify run for a few seconds.


Version 0.57. Tagged as 'BCM2835-0_57'
parent eefa2115
/* (0.56)
/* (0.57)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.56
#define Module_MajorVersion_CMHG 0.57
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 Mar 2016
#define Module_Date_CMHG 04 Apr 2016
#define Module_MajorVersion "0.56"
#define Module_Version 56
#define Module_MajorVersion "0.57"
#define Module_Version 57
#define Module_MinorVersion ""
#define Module_Date "29 Mar 2016"
#define Module_Date "04 Apr 2016"
#define Module_ApplicationDate "29-Mar-16"
#define Module_ApplicationDate "04-Apr-16"
#define Module_ComponentName "BCM2835"
#define Module_ComponentPath "mixed/RiscOS/Sources/HAL/BCM2835"
#define Module_FullVersion "0.56"
#define Module_HelpVersion "0.56 (29 Mar 2016)"
#define Module_LibraryVersionInfo "0:56"
#define Module_FullVersion "0.57"
#define Module_HelpVersion "0.57 (04 Apr 2016)"
#define Module_LibraryVersionInfo "0:57"
......@@ -852,14 +852,16 @@ SetActivity_B3 ROUT
LDR a2, [a1]
SXTH a4, a2, ROR #16 ; Enable count
SXTH a2, a2 ; Disable count
SUB lr, a4, a2
SXTH lr, lr ; Difference
TEQ a3, #HALDeviceSDHCI_ActivityOff
BEQ %FT50
CMP a4, a2
CMP lr, #0
Pull "sb,pc", GT ; Don't update if already on
ADD a4, a4, #1
B %FT90
50
CMP a4, a2
CMP lr, #0
Pull "sb,pc", LE ; Don't update if already off
ADD a2, a2, #1
90
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment