Jump to content

TET

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by TET

  1. Problem Solved. In my case, there were some left over processes causing corruption. After I correct this, I have repeatability.
  2. Hi I have the same daqhat setting and observed the same problem. In my case, when I start from a fresh power on, above solution works. But if I stop the scan and then restart again, the synchronization between two hats is lost. I have to power off and on to have synch again. I tried to reset the hats by mcc172_reset() but it is not successful and returns -1. Is there any way to have synch between hats without a need for power off? Thanks
  3. Hi Here is the update from last time. The problem is chronic and is repeated every one of three shutdown-restart cycle. I believe that the main cause of the error is either daqhat firmware or the daqhat installed programs . The error "can't open device" comes from the daqhat_list_boards which calls mcc172_open() function. Error is created since mcc172_open does not successfully communicate with the Atmel microcontroller in the board. When we look at the mcc172_open() function, there is this comment, // Initial prototypes had active low reset, and the GPIO signal // defaults to low. This causes the micro to be held in reset if // the library has not been opened since booting. In that case, add // an extra delay for the micro to start. I think my previous trick (remote GPIO on/off) works since it changes the state and microcontroller is out of reset state. Below I give you the screen shots for the error. The first one shows the error and the unsuccessful attempt of the firmware update. The second one shows the GPIO states. On the left when there is the error, on the right when the board works appropriately. There are some changes but I am not sure if I can catch any abnormality. The SPI, I2C are both on for all times. Would be great if this problem is solved! I am also giving the links for previously reported same/similar problems. https://forums.raspberrypi.com/viewtopic.php?t=248153 https://github.com/mccdaq/daqhats/issues/26 https://github.com/mccdaq/daqhats/issues/3 Best Regards
  4. Thanks for the detailed information. I believe the board does not have hardware problem since it worked after I switched with the backup SD card. The other 2 causes are plausible. In Raspberry Pi OS I2C is not on by default. However after daqhat installment GPIO3 pin can not be claimed to initiate shutdown with a button. Probably after daqhat installment GPIO3 is claimed and not usable for any other task. The problem is observed as follows. When I use either DAQ manager or execute daqhats_list_boards command, it lists the two boards. But hat 2( address 1) has "can't open device" error. After I got this error, when I try to firmware update, it fails and it gives different error at each try for the address 1. Then I did what you suggested. I uninstalled daqhat and did full-upgrade, reboot , re-install daqhat and run "daqhats_list_boards" command. The same error is observed. Firmware update may be successful on some tries rarely but does not hold after a shutdown. As I said before the only way I could get rid of it for the time being is to start with a new SD card. Both MCC hats are Mcc 172. Currently my daqhat stack works. My pi 4 does not have I2c enabled in its configuration (still works though). Maybe that was the problem to start with. I hope that the same problem does not repeat. If it does İ will let you know. Thanks for the help. Best regards
  5. Thank you John. For the I2c I was referring the config.txt where there are specific lines belonging to I2c commented. Probably Raspberry pi still enables I2C by default. Since I am using C, ctrl+c is not handled as in the case of python. Nevertheless, it was my guess about the weird behaviour as "cant open device" error. The true cause is yet to be found but it is definitely a very disturbing error. Note that other people also reported similar problems before but they also did not find the root cause. Best
  6. Well Spi is enabled but i2c is not I suppose (does not matter tried different versons). After digging into problem, here are my additional comments. The problem is not hardware related, it is software problem. I have changed the SD card with my backup and it worked. Temporary solution for this problem is to make remote GPIO (in raspberry menu) "on" or "off" and try firmware update again. In my case i was able to update the firmware and the second board is identified. But that is somewhat temporary since the problem repeats after a shutdown. I believe that the main root of the problem comes from the MCC daqhat program termination style. I used to terminate the program with a ctrl+c. This does not close MCC 172 appropriately and some registers are corrupted further destabilizing the daqhat installment together with the OS. So the next problem becomes how are we going to terminate a daqhat program gracefully if a shutdown command is executed? Thanks
  7. Hi I have 2 Mcc 172 daqhats which I have installed as described in the github to Raspberry pi 4. They are in address 0 and 1. I have installed the daqhat library. After that when I call daqhats_list_boards command I have the error "can't open device" for the daqhat at address 1. When I update the firmware for this daqhat, it corrects the problem. However if I shutdown the device and open again the same problem persists. The firmware update command is not successful for all attempts. There is no problem for the device at address 0. It is always detected appropriately. The same problem exists for other boards I have so it is not an isolated board specific problem. How can we resolve this problem? Thanks
×
×
  • Create New...