Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flashing -> no device present #1

Open
Luckyman7471 opened this issue Jan 23, 2021 · 7 comments
Open

flashing -> no device present #1

Luckyman7471 opened this issue Jan 23, 2021 · 7 comments

Comments

@Luckyman7471
Copy link

When I try to flash the ATmega I get the following error message:

gpio -g mode 11 out
gpio -g write 11 0
sleep 1
gpio -g write 11 1
sleep 1
sudo dfu-programmer atmega32u4 erase
dfu-programmer: no device present.
make: *** [Makefile:498: flash] Error 1

@shpi
Copy link
Owner

shpi commented Jan 23, 2021

With the new batches of SHPi.one u have to do it this way:

i2cset -y 2 0x2A 0xFE 0x00 # sets CRC check off
i2cset -y 2 0x2a 0xFD 0xff # enables dfu modus
sudo dfu-programmer atmega32u4 erase
sudo dfu-programmer atmega32u4 flash XXXX.hex
sudo dfu-programmer atmega32u4 start # propably not necessary

The HWB Pin is set high via 10k Ohm and enables Autostart. Old revisions need the command "sudo dfu-programmer atmega32u4 start" on each linux boot, we decided to change it, to have a boot screen asap.

@Luckyman7471
Copy link
Author

Thank you for your prompt reply.
Unfortunately that doesn't work either

pi@SHPI:~$ i2cset -y 2 0x2A 0xFE 0x00
Error: Write failed

@shpi
Copy link
Owner

shpi commented Jan 24, 2021

can u give me output of "i2cdetect -y 2" "lsusb" and "gpio -g readall" maybe to my email lh@shpi.de

@Luckyman7471
Copy link
Author

image

@shpi
Copy link
Owner

shpi commented Jan 26, 2021

what does "lsusb" print?

@Luckyman7471
Copy link
Author

Luckyman7471 commented Jan 26, 2021

oh sorry

Screenshot_20210126-205824__01

@shpi
Copy link
Owner

shpi commented Jan 26, 2021

It seems the atmega32u4 is flashed with a wrong software, did u changed it? we ship it only with preflashed firmware. to fix it, u need to take the pcb out, power it via microusb from the raspberry zero and short the HWB pin to GND while resetting the ATmega with gpio 11 or on startup. you'll find the HWB pin near the main 12pin connector from power supply. after that the atmega should show up on lsusb command in DFU modus, ready to flash. please short hwb pin to gnd with 1k resistor. we could also do the job for u.

does the display still work? the display is initialized via the atmega.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants