Jump to content

How to flash firmware on Raspberry HAT


aslowik

Recommended Posts

Hi, how to flash firmware into a 1.4 Raspberry HAT module that does not show on USB? The HAT was operational, and unfortunately I connected from remote over WLAN and started a firmware update. The connection broke after a few seconds and now the HAT remains in some special state. Status LED is flashing, but module does not show on USB if I connect to the USB-port on the HAT module, neither from Raspberry nor some from other MAC OSX computer. I power-cycled the Raspberry a couple of times already, but behavior remains the same. 

Link to comment
Share on other sites

The USB port on the HAT Brick is power only. The problem you're running into now is that the HAT Brick is in bootloader mode and in this mode the HAT autodetection of the Raspberry Pi doesn't work. Otherwise the HAT Brick you just show up in Brick Viewer and you could just flash it.

You need to manually edit the /etc/brickd.conf file on the Raspberry Pi and add these lines to the end of the file:

bricklet.group0.spidev = /dev/spidev0.0

bricklet.group0.cs0.driver = gpio
bricklet.group0.cs0.name = gpio23
bricklet.group0.cs0.num = 23

bricklet.group0.cs1.driver = gpio
bricklet.group0.cs1.name = gpio22
bricklet.group0.cs1.num = 22

bricklet.group0.cs2.driver = gpio
bricklet.group0.cs2.name = gpio25
bricklet.group0.cs2.num = 25

bricklet.group0.cs3.driver = gpio
bricklet.group0.cs3.name = gpio26
bricklet.group0.cs3.num = 26

bricklet.group0.cs4.driver = gpio
bricklet.group0.cs4.name = gpio27
bricklet.group0.cs4.num = 27

bricklet.group0.cs5.driver = gpio
bricklet.group0.cs5.name = gpio24
bricklet.group0.cs5.num = 24

bricklet.group0.cs6.driver = gpio
bricklet.group0.cs6.name = gpio7
bricklet.group0.cs6.num = 7

bricklet.group0.cs7.driver = gpio
bricklet.group0.cs7.name = gpio6
bricklet.group0.cs7.num = 6

bricklet.group0.cs8.driver = gpio
bricklet.group0.cs8.name = gpio5
bricklet.group0.cs8.num = 5

as described here: https://www.tinkerforge.com/en/doc/Hardware/Bricks/HAT_Brick.html#compatibility-to-other-boards-and-images

Afterwards reboot the Raspberry Pi, then the HAT Brick should show up in Brick Viewer again and you can flash it.

One the HAT Brick is flashed success fully, edit /etc/brickd.conf again and remove the lines you just added.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...