Milliways
Posts: 223
Joined: Fri Apr 25, 2014 12:18 am

Gertboard with Pi2 Jessie

Sat Oct 07, 2017 1:53 am

I just pulled out my Gertboard, and plugged it into a Pi2 running Jessie.
I have enabled SPI from the raspi-config menu.

I have not used the Gertboard for some time, and then on a Pi B+

I tried the dtoa.c sample, in preparation for some project I want to work on.

This seems to hang in the

Code: Select all

write_dac()
function.

Have there been any changes/updates to the gertboard software, or is there any reason it doesn't work on the Pi2?

I will go back and try further tests, but thought there may be some existing answers.

EDIT: just tested

Code: Select all

gpio gbw 0 128
writes to the DAC successfully, so there is a software issue.

User avatar
Gert van Loo
Posts: 2422
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Gertboard with Pi2 Jessie

Sat Oct 07, 2017 9:01 am

Have there been any changes/updates to the gertboard software, or is there any reason it doesn't work on the Pi2?
The biggest change to all The raspberry-Pi I/O has been a while ago when they added a device tree.
I'll be honest: I never understood how that worked but you can no longer 'just' access any of the I/O devices.

Milliways
Posts: 223
Joined: Fri Apr 25, 2014 12:18 am

Re: Gertboard with Pi2 Jessie

Sat Oct 07, 2017 10:14 am

Gert van Loo wrote:
Sat Oct 07, 2017 9:01 am
Have there been any changes/updates to the gertboard software, or is there any reason it doesn't work on the Pi2?
The biggest change to all The raspberry-Pi I/O has been a while ago when they added a device tree.
I'll be honest: I never understood how that worked but you can no longer 'just' access any of the I/O devices.
I guess this implicitly answers my question; there have been no updates.

I can't see that Device Tree would change anything that the gertboard software does, as it only seems to impact the boot process (and considerably simplify module loading).

The change in port mapping on the Pi2/3 would certainly impact addressing, and the serial and I²C changes probably as well.

After some initial testing to verify that WiringPi could address the DAC using SPI, I bit the bullet and wrote my own code using WiringPi, which seems to be working OK.

User avatar
Gert van Loo
Posts: 2422
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Gertboard with Pi2 Jessie

Sat Oct 07, 2017 1:46 pm

The change in port mapping on the Pi2/3
That remark reminded me: On the Pi2 and Pi3 the peripheral base address has been moved!!

On Pi1 it is 0x20000000 on Pi2 and 3 it is 0x3F000000.

gb_common.c:
#define BCM2708_PERI_BASE ...

Return to “Gertboard classic”

Who is online

Users browsing this forum: DougieLawson and 1 guest