obtaining the peripheral base address of raspberry pi
Terry Swanborough (61) 152 posts |
For some of my projects using the raspberry pi I need to enable the watchdog timer and also I2S audio output because there is no way to achieve this within As RISC OS has already identified the board and processor that it is running on, is there a way of obtaining the peripheral base address from within RISC OS by using HAL It would just be useful rather than duplicating this code. Also if someone knows where this section of code is within the sources can you post a link so I can have a look at what RISC OS does to identify each board type TIA |
Jon Abbott (1421) 2651 posts |
From memory, I don’t believe you can get them via RISC OS. They’re fixed address though which you can find in the RPi Peripheral Addresses documentation. The RISC OS source for the addresses is here and the source for the CPU detection is here And here’s some example code from where we were trying to diagnose the Gamma lock-up issue on the Pi2:
|
Terry Swanborough (61) 152 posts |
Hi Jon Thanks for the information I already have the sound module and watchdog timer up and running on raspberry PIs but my detection routine was failing to identify some versions of PI boards correctly, It would just have been easier to get the address via RISC OS as it’s already identified the CPU and board. Thanks again for the information I will study how RISC OS identifies the various boards. |