-
Notifications
You must be signed in to change notification settings - Fork 123
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
Trouble with Raspberry pi 5 #1748
Comments
Apparently new kernel versions base the GPIO numbers at 512, not 0. So, another workaround is to add 512 to the gpio numbers of your linuxgpio entry in ~/.avrduderc. |
@BastienCagna It's been some time. Has your question been answered? Can the issue be closed? |
Hey, sudo /usr/local/bin/avrdude -p t2313 -c linuxgpio -P gpiochip0 -U flash:w:test.hex -v
avrdude: Version 7.3-20240428 (37ac6eba)
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is /usr/local/etc/avrdude.conf
User configuration file is /root/.avrduderc
User configuration file does not exist or is not a regular file, skipping
using libgpiod for linuxgpio
Using port : gpiochip0
Using programmer : linuxgpio
avrdude: input file test.hex auto detected as Intel Hex
AVR Part : ATtiny2313
Programming modes : ISP, HVPP, debugWIRE, SPM
Programmer Type : linuxgpio
Description : Use the Linux sysfs interface to bitbang GPIO lines
Pin assignment : libgpiod
RESET = 22
SCK = 11
SDO = 10
SDI = 9
avrdude bitbang_initialize() error: AVR device not responding
avrdude main() error: initialization failed, rc=-1
- double check the connections and try again
- use -B to set lower the bit clock frequency, e.g. -B 125kHz
- use -F to override this check
avrdude done. Thank you. It tried to change baudrate (-B 100) but it also failed. Also, here is the state of pinctrl just after trying to flash: $ pinctrl
0: ip pu | hi // ID_SDA/GPIO0 = input
1: ip pu | hi // ID_SCL/GPIO1 = input
2: no pu | -- // GPIO2 = none
3: no pu | -- // GPIO3 = none
4: no pu | -- // GPIO4 = none
5: no pu | -- // GPIO5 = none
6: no pu | -- // GPIO6 = none
7: no pu | -- // GPIO7 = none
8: no pu | -- // GPIO8 = none
9: ip pd | lo // GPIO9 = input
10: ip pd | lo // GPIO10 = input
11: ip pd | lo // GPIO11 = input
12: no pd | -- // GPIO12 = none
13: no pd | -- // GPIO13 = none
14: no pd | -- // GPIO14 = none
15: no pd | -- // GPIO15 = none
16: no pd | -- // GPIO16 = none
17: no pd | -- // GPIO17 = none
18: no pd | -- // GPIO18 = none
19: no pd | -- // GPIO19 = none
20: no pd | -- // GPIO20 = none
21: no pd | -- // GPIO21 = none
22: ip pd | lo // GPIO22 = input
23: no pd | -- // GPIO23 = none
24: no pd | -- // GPIO24 = none
25: no pd | -- // GPIO25 = none
26: op dh pd | hi // GPIO26 = output
27: no pd | -- // GPIO27 = none
... I then tried to set mannualy the pin to their needed function (using a0 for GPIO9 10 & 11 et setting 22 to ouput and high logical state). avrdude looks to not change those state and not reset is seen on the MCU. I have no ~/.avrduderc but I guess it is equivalent to the global configuration made in avrdude.conf. So your workaround is to specify SCK = 512 + 11 = 523 ? For me it failed (but as I said, the first problem looks already fixed now for me). If it may help, Here is a sample of my avrdude.conf (by the way, the empty default spi suprised me):
|
@BastienCagna The short of it is that I don't have an answer. This requires more debugging. The posted run looks like
@BastienCagna If you know a method to set |
It looks like neither the auto tools nor Cmake deals with the It may be as simple as adding And |
@stefanrueger and @BastienCagna I do not have Raspberry Pi 5, but libgpiod and git main work well for me on my Raspberry Pi 400. I have no idea why it does not work on Raspberry Pi 5. I can only suggest @BastienCagna to check the connection. The other suggestion is to try linuxspi as well to see if that works or not. Or try another MCU to see if that makes a difference or not. Reference: my test results posted for PR #1792. |
@MCUdude Great idea! Do you want to do a PR? |
Hello,
I was using avrdude to flash my MCU from an old Raspberry Pi 3 and recently move to the new Pi 5.
I was used to flash using this command:
But now, it return that:
I know that this new version of the raspberry use the new RP1 chip to control GPIO. Could it be the source of this trouble? May exist a workarround?
Regards,
Bastien
The text was updated successfully, but these errors were encountered: