I tried to use the Arduino/Linduino code from the LTC4162 SDK to change the code running on the Atmel device found on the 2038A demo circuit to run my own custom application.I am trying to debug my way through this at present without much luck.
[Please NOTE:In the SDK readme there is a line that states "This project is compatible with our Linduino development platform (https://www.analog.com/en/design-center/evaluation-hardware-and-software/linduino.html). The file location listed semms to point at a broken link - page not found Error]
Whilst trying to get my own application code running in Arduino I came to a point when nothing was compiling so I thought I would go back to the origional application that runs with the GUI. When I start up the GUI I tried to use the "program Default Firmware button".... but after a few minutes I get an error stating that "GenuinoZero Bootloader NOT found. Programming Failed!"
Have I now got a bricked demo board? - any suggestions on how to get back to the out of the box experience??
You're saying that if you click that link (https://www.analog.com/en/design-center/evaluation-hardware-and-software/linduino.html), you get a Page Not Found Error? The link works for me, can you try again?
Anyway, the underlying issue here seems to be that you're trying to upload the Linduino code onto the DC2038A demo board which is note Linduino-based. The demo board uses an MZero processor, so you should follow the README instructions for the MZero example. That should work - though if the board is really bricked it may not.
I actually don't see how it could be bricked - if nothing compiled, then nothing should have been uploaded to the board. I just tried to upload the Linduino example onto the DC2038A board and programming failed completely (as expected), but that means nothing was uploaded and the board actually just retained its firmware and worked with the GUI.
Can you check the device properties in Device Manager and show me how it shows up (or if it still does)? I'd like to see the Properties -> General and Properties -> Events tabs. Also, try a different port on your computer.
If none of this works, don't worry too much. I can send you another board and you can send this one back to me if it comes to that.
Firstly, thanks for picking this up.
So, If I am understanding this correctly, I have an LTC4162-SAD PCB, so therefore to modify the onboard firmware I should use the Mzero project (located in the SDK an LTC4162>c_code>examples>dc2038a>THC4162-SAD_example_mzero.ino) ?
In the readme file it says for the LTC4162-SAD:
LTC4162-SAD_example_mzero.ino - An Arduino Zero compatible example using the librarieswithin MZeroSketchbook to communicate with the LTC4162.To build the Arduino Zero project successfully, the following filesmust be placed in a folder called 'LTC4162-SAD_example_mzero': LTC4162-SAD_example_mzero.ino LTC4162-SAD.c LTC4162-SAD.h LTC4162-SAD_formats.h LTC4162-SAD_reg_defs.hInstall Arduino IDE version 1.8.7 or later from www.arduino.cc/.../Softwareif you don't already have it.In Windows Explorer, double-click on the copy of LTC4162-SAD_example_mzero.inoyou created above inside folder 'LTC4162-SAD_example_mzero'.This will launch Arduino IDE.Click on Tools -> Board: -> Boards Manager , and install the"Arduino SAMD Boards" version 1.6.20 or later.Click on File -> Preferences , and change Sketchbook location to be the pathto the MZeroSketchbook folder.Plug in your LTC4162-SAD demoboard via USB.Click on Tools -> Port . Select the port corresponding to the LTC4162-SAD demoboard.You're now ready to compile and upload the sketch to your LTC4162-SAD demoboard.
I have done all of the above -
1) I have installed IDE version 1.8.9
2) Added the required files to the required folder:
3) Installed the Arduino SAMD Boards in the board manager:
4) changed Sketchbook location to be the pathto the MZeroSketchbook folder:
5) For the port I get two two port (of which I have tried both)
When I compile I get the following error:
Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Zero (Programming Port)"
Build options changed, rebuilding allLTC4162-SAD_example_mzero:92:10: error: Comm_SMBus.h: No such file or directory
exit status 1Comm_SMBus.h: No such file or directory
Now in this readme.txt file I do not see any mention of the LTSketchbook (of which I now seem to have two different versions on my PC - one called "LTSketchbook-master.zip" which I downloaded from the Github site (mentioned in a different readme) and another called just "LTSketchbook" from the link that now seems to be working [both of these files have different contents]. Do I need either of these files to get the "SAD_example_mzero.ino" code to compile (if so, which one and where do I need to put it)???
The issue is partially your setup and partially the fact that the SDK hosted online needs to be updated. I've attached the updated version here. Follow the README instructions carefully and it should work for you.
Step 3: that's the wrong install, the README says to install Arduino SAMD Boards but you have installed Arduino AVR Boards
Step 4: that's not the right folder, the README says to point to MZeroSketchbook (located on the top level of the SDK), the attached SDK has this folder while the download online erroneously does not
Step 5: that's the wrong board selection, the updated README says to select Arduino/Genuino Zero (Native USB Port), this will show up once you have installed Arduino SAMD Boards
That should get it all working.
Thats got it.... it now compiles with the new SDK MZeroSketchbook and the native USB port selected.
Many thnaks for your help
No problem, thanks for the detailed feedback. I'll get the updated version online ASAP.