Go to advanced search

by baantonia
Sun Aug 28, 2016 6:58 am
Forum: Bare metal, Assembly language
Topic: Suspicious atags address
Replies: 10
Views: 2278

Re: Suspicious atags address

Hi, I'm used to both GNU and RISCOS assembler so the 0x and & are familiar to me. In fact as I'm trying to communicate between two Pis, one being bare metal and the other running RISCOS I have had to use both notations. As rpdom said, 0x8000 is being used as a starting point for a full descending st...
by baantonia
Thu Aug 25, 2016 9:53 am
Forum: Bare metal, Assembly language
Topic: Suspicious atags address
Replies: 10
Views: 2278

Re: Suspicious atags address

Hi BrianW, Sorry, my bad. The code I posted was incorrect, the code you suggested is in fact what I'm using, but thank you for your response. Still haven't fathomed that one out. Currently puzzling over why I cannot seem to get the SPI slave configuration working. I'm thinking of switching to I2C sl...
by baantonia
Fri Aug 19, 2016 8:51 am
Forum: Advanced users
Topic: Clarifications on BSC slave
Replies: 12
Views: 6490

Re: Clarifications on BSC slave

Sorry for dragging up an old thread but did anyone manage to get to the bottom of the BCM2835 SPI slave?

I can receive and process RX data but the TX FIFO fills up and never empties and I have no signal transitions on GPIO18 showing any output using an oscilloscope.
by baantonia
Fri Aug 19, 2016 12:19 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Two Pis communicating via SPI
Replies: 7
Views: 1516

Re: Two Pis communicating via SPI

As far as I can detect, the slave SPI TX FIFO has enough storage for 16 bytes, After modifying my code for the Pi Zero (I've changed it from the compute module to see if that makes a difference) the code loops on waiting for space in the TX FIFO to become available, however this never happens, the T...
by baantonia
Thu Aug 18, 2016 2:45 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Two Pis communicating via SPI
Replies: 7
Views: 1516

Re: Two Pis communicating via SPI

I've checked all my settings and I'm getting data transferred from the Pi3 using the SPI master and this is being received in the compute module SPI slave. The clock is functioning from the master but hard as I try, the slave doesn't send a signal back. I'm writing 0xAA to the slaves DR register so ...
by baantonia
Thu Aug 18, 2016 10:38 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Two Pis communicating via SPI
Replies: 7
Views: 1516

Re: Two Pis communicating via SPI

RISCOS and bare metal aside, that I can cope with. What I'm not sure about is what settings need to be in place for the SPI slave to function correctly, ie the register settings. I've just checked that the routine running on the Pi3 is actually communicating, first using a Gertboard and then poking ...
by baantonia
Thu Aug 18, 2016 9:33 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Two Pis communicating via SPI
Replies: 7
Views: 1516

Re: Two Pis communicating via SPI

Swapping MISO/MOSI made no difference.

Puzzled?????
by baantonia
Thu Aug 18, 2016 9:29 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Two Pis communicating via SPI
Replies: 7
Views: 1516

Re: Two Pis communicating via SPI

My Pi3 is running RISCOS using a module I've written, there is no problem there as I have had it communicating with a number of SPI chips. The compute module is running bare metal which I have also been able to communicate as a SPI master to a mcp3002 chip. My overall goal is to create an interface ...
by baantonia
Thu Aug 18, 2016 8:47 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Two Pis communicating via SPI
Replies: 7
Views: 1516

Two Pis communicating via SPI

I'm trying to interface two Pis via SPI. The Pi3 has been set up as the master, GPIO connections 7-11 as ALT0, and is sending data as if it was connected to a Gertboard with a mcp3002 ADC chip, this works with the Gertboard. The compute module has had GPIO connections 18-21 set up as ALT3 with the C...
by baantonia
Mon Aug 15, 2016 3:28 pm
Forum: Bare metal, Assembly language
Topic: Bare Metal with Pi Zero
Replies: 5
Views: 5319

Re: Bare Metal with Pi Zero

A little project, very early days and probably not using the correct tools etc..... Doesn't use any of the libraries (although uses the headers) from the arm-none-eabi install. I'm running it on a Compute Module but in essence, apart from the speed difference and pin access, they are essentially the...
by baantonia
Fri Aug 12, 2016 12:50 pm
Forum: Bare metal, Assembly language
Topic: Suspicious atags address
Replies: 10
Views: 2278

Suspicious atags address

Hi, In preparation of trying to read and interpret the atags, I get the following values passed to my main code. I do have intervening code which sets up stacks for the different processor modes but I save off r0, r1 and r2 just below where my image loads with the code: mov sp, #0x8000 stmfd sp, {r0...
by baantonia
Thu Aug 11, 2016 10:04 am
Forum: RISCOS
Topic: Firmware changes?
Replies: 14
Views: 4016

Re: Firmware changes?

I agree, this is what I do, apart from starting with a RC14 install.
by baantonia
Thu Aug 11, 2016 8:29 am
Forum: RISCOS
Topic: Firmware changes?
Replies: 14
Views: 4016

Re: Firmware changes?

Hi microbits, Just as I said about RC14. By changing the ROM and the firmware and conducting the patching you have changed the version. You no longer have the initial RC14, only the partition structure and stuck with the 2GB size on any SD card you use, RC14 will not run on RPi3 directly as is, I've...
by baantonia
Thu Aug 11, 2016 5:49 am
Forum: RISCOS
Topic: Firmware changes?
Replies: 14
Views: 4016

Re: Firmware changes?

By the way, if you don't mind paying for some development tools, the ROOL DDE software is very useful, tools I've used since the days of Acorn. Current version of the DDE runs on all the versions of RPi's.
by baantonia
Wed Aug 10, 2016 9:50 pm
Forum: RISCOS
Topic: Firmware changes?
Replies: 14
Views: 4016

Re: Firmware changes?

The RPi has no firmware in the sense of what you might find in a BIOS or router in that the RPi has no in-built storage (except the compute module). What you might consider to be equivalent to the firmware are the files contained within the FAT32 partition, these have changed over time with the chan...
by baantonia
Fri Aug 05, 2016 8:36 am
Forum: General programming discussion
Topic: Web Development on the Pi
Replies: 12
Views: 14894

Re: Web Development on the Pi

I've used Glassfish on a Pi3 (found other Pi's too slow!) with MySQL for the DB back end stuff. Code to be uploaded to Glassfish has been written on a number of different platforms using Netbeans, which can colour code multiple languages. The only issue here is it's not PHP, have to get used to Java...
by baantonia
Sun Jul 31, 2016 6:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Raspberry Pi as I2C slave?
Replies: 10
Views: 6334

Re: Raspberry Pi as I2C slave?

I'm planning to use a Pi Zero as a slave, communicating over SPI using GPIOs 18, 19, 20 and 21 (pins 12, 35, 38 and 40). However the same pins can be used as an I2C slave according to the documentation set to function select ALT3.
by baantonia
Thu Jul 28, 2016 11:45 pm
Forum: Bare metal, Assembly language
Topic: Simple bare metal code on RPi 3 doesn't work
Replies: 2
Views: 812

Re: Simple bare metal code on RPi 3 doesn't work

With a brief glance, you seem to have set GPIO 16 to mode ALT3 or CTS0 with the 'mov r1, #7' rather than an output. It probably should be 'mov r1, #1' instead setting the mode to output. GPIO 16 should be header pin 36.
by baantonia
Wed Jul 20, 2016 11:41 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI and Interrupt mode
Replies: 2
Views: 1253

Re: SPI and Interrupt mode

I think my issue is because the REN bit in the CS register is set by default so the SPI0 would be in bidirectional mode rather than standard mode, the latter using 3 lines rather than 2. Although not tested yet within an interrupt, I expect this would solve my problem.
by baantonia
Wed Jul 20, 2016 10:07 am
Forum: Bare metal, Assembly language
Topic: SPI data transfer issue
Replies: 5
Views: 1369

Re: SPI data transfer issue

Discovered my issue! The default value for the REN bit in the CS register is 1, which if left as it is sets the the SPI0 in bidirectional master mode whereas I'm using the polling method for standard mode. After changing the REN bit to 0 on setup, the MOSI and MISO pins transition between the correc...
by baantonia
Mon Jul 18, 2016 9:01 am
Forum: Bare metal, Assembly language
Topic: SPI data transfer issue
Replies: 5
Views: 1369

Re: SPI data transfer issue

Checked the settings after the initial setup before the SPI poll routine, see below. I'll check the settings of pins 7-11 after polling just in case something gets changed and get back. GPFSEL0=0x24801000 GPFSEL1=0x01224024 So all GPIO pins 7-11 are set to 0b100 Just checked to see if the pin modes ...
by baantonia
Fri Jul 15, 2016 10:06 pm
Forum: Bare metal, Assembly language
Topic: SPI data transfer issue
Replies: 5
Views: 1369

Re: SPI data transfer issue

There is no C library or Linux, all in pure assembler. Routines which access the hardware directly are written to use individual svc/swi calls (cf RISCOS, but no RISCOS in sight!) and each read or write to the GPIO or SPI memory areas have a data memory barrier (I hope). The pin modes are correct '0...
by baantonia
Fri Jul 15, 2016 5:00 pm
Forum: Bare metal, Assembly language
Topic: SPI data transfer issue
Replies: 5
Views: 1369

SPI data transfer issue

I'm using assembler code to connect either a pi-zero or a B+ to a Gertboard with its mcp3002 ADC chip. So far using an oscilloscope the clock and cs lines are operating correctly between 3.3V and 0V but the MOSI line goes to a maximum of about 3mV, which is probably too low for the ADC chip to detec...
by baantonia
Wed Jun 08, 2016 4:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI and Interrupt mode
Replies: 2
Views: 1253

Re: SPI and Interrupt mode

Tried mirroring the polled method but using a state flag to show at what stage in the sequence the routine was in whilst in an interrupt. Switched off INTR and INTD bits in the CS Register so just used any interrupt that happened to come along. Got the same result SCLK was ticking fine but the volta...
by baantonia
Tue Jun 07, 2016 6:24 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI and Interrupt mode
Replies: 2
Views: 1253

SPI and Interrupt mode

After successfully interfacing a number of ADC chips using polled mode I’m now trying to use interrupt mode, however this is being annoyingly elusive. So far I have added code to the SPI module, I wrote some time ago, to us the interrupt vector at &100 (note I'm using RISCOS) and have enabled the SP...

Go to advanced search