Commit be0775b6 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix constant under-voltage warnings on Pi 3

Detail:
  s/IIC - Only adjust the pin mux settings for the pins + IIC controller which we're using, the other pins/controllers might be being used for another purpose (on Pi 3 GPIO0/SDA0 seems related to power control/under-voltage detection)
Admin:
  Tested on Pi 3
  Fixes constant rainbow square (under-volt warning) shown by firmware and inability to scale clock speed above default


Version 0.53. Tagged as 'BCM2835-0_53'
parent c1a6cf63
/* (0.52) /* (0.53)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 0.52 #define Module_MajorVersion_CMHG 0.53
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Mar 2016 #define Module_Date_CMHG 26 Mar 2016
#define Module_MajorVersion "0.52" #define Module_MajorVersion "0.53"
#define Module_Version 52 #define Module_Version 53
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "25 Mar 2016" #define Module_Date "26 Mar 2016"
#define Module_ApplicationDate "25-Mar-16" #define Module_ApplicationDate "26-Mar-16"
#define Module_ComponentName "BCM2835" #define Module_ComponentName "BCM2835"
#define Module_ComponentPath "mixed/RiscOS/Sources/HAL/BCM2835" #define Module_ComponentPath "mixed/RiscOS/Sources/HAL/BCM2835"
#define Module_FullVersion "0.52" #define Module_FullVersion "0.53"
#define Module_HelpVersion "0.52 (25 Mar 2016)" #define Module_HelpVersion "0.53 (26 Mar 2016)"
#define Module_LibraryVersionInfo "0:52" #define Module_LibraryVersionInfo "0:53"
...@@ -87,13 +87,16 @@ IIC_Init ...@@ -87,13 +87,16 @@ IIC_Init
STR a2, IIC_Base ; Store the choice STR a2, IIC_Base ; Store the choice
; Set up output pins of BSC0 and BSC1 ; Set up output pins of BSC0 and BSC1
; Set GPIO0 to SDA0, GPIO1 to SCL0, GPIO2 to SDA1 and GPIO3 to SCL1 ; Set GPIO0 to SDA0, GPIO1 to SCL0, GPIO2 to SDA1 and GPIO3 to SCL1
; Only adjust the configuration of the pins for the controller we're using -
; the other pins/controller might be being used for a different purpose (e.g.
; Pi 3, GPIO 0/SDA0 seems related to power control/under-voltage detection)
LDR a2, PeriBase LDR a2, PeriBase
ADD a3, a2, #GPIO_Base ADD a3, a2, #GPIO_Base
LDR a2, [a3, #GPFSel0] ; Must set GPIO0..3 to alt-f0 LDR a2, [a3, #GPFSel0] ; Must set GPIO0..3 to alt-f0
BIC a2, a2, #8_00000077 ; which is binary 100 BICLO a2, a2, #8_00000077 ; which is binary 100
BIC a2, a2, #8_00007700 BICHS a2, a2, #8_00007700
ORR a2, a2, #8_00000044 ORRLO a2, a2, #8_00000044
ORR a2, a2, #8_00004400 ORRHS a2, a2, #8_00004400
STR a2, [a3, #GPFSel0] STR a2, [a3, #GPFSel0]
DoMemBarrier a1 ; Ensure all peripheral registers DoMemBarrier a1 ; Ensure all peripheral registers
; Enable the controller ; Enable the controller
......
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