Canot set pin as output

More
9 years 10 months ago #84711 by yaqwsx
I created a custom firmware for Mesa 5i24/6i24 based on existing ones, so I could have a single servo and 5 stepgens with a reasonable pinout. There is no problem with loading the firmware to PnCConf (I can see correct pinout and assign functions to modules and pins), however when I try to run LinuxCNC with generated configuration, it fails, because there is a missing parameter is_output for some pins. These pins shouldn't be assigned to any module and therefore, they should have this parameter. I inspected the hm_5i24 module and there are GPIO pins, which doesn't have this parameter. I haven't found any rule - they seem random - e.g. pins 7, 9, 11, 25, 30, 31, 48, 49.

What could be wrong?

My sources for the firmware can be found here:
pastebin.com/mLVY5qhq
pastebin.com/9eqWfWR6

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #84742 by yaqwsx
Replied by yaqwsx on topic Canot set pin as output
Ok, I finally found the problem - it is not in PnCConf. The problem is in my custom firmware - resulting firmware has different pinout from which I expected. This is strange to me - I have problem to find out what might be wrong with the source code. The synthesis runs fine with no errors, the firmware seems to be accepted by the card, it just has a different pinout - there are extra GPIO pins in between pins connected to modules.

What am I doing wrong? Here's my PIN file and a log showing the real pinout:
PIN: pastebin.com/93axsrXV
Pinout: pastebin.com/jkhSt3t6

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #84762 by PCW
Replied by PCW on topic Canot set pin as output
That's pretty weird, let me try building that config here and see what I get

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #84764 by yaqwsx
Replied by yaqwsx on topic Canot set pin as output
Problem solved. It was my stupidity - after flashing new firmware to EEPROM, it is necessary to completely shut-down the PC, ordinary reboot is not sufficient to make the changes visible.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #84776 by PCW
Replied by PCW on topic Canot set pin as output
Ahh yes you need to make sure you are running the expected firmware or you will end up going in circles

Note that you can also load new firmware by using the --reload option of mesaflash after writing the new firmware:

sudo mesaflash --device 5i24 --reload

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #84777 by yaqwsx
Replied by yaqwsx on topic Canot set pin as output
The --reload options was not working for me. Only the full shutdown helped.

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.344 seconds
Powered by Kunena Forum