Found unknown device id [solved] - Printable Version +- ds30 Loader free edition forums (https://picbootloader.com/forum) +-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3) +--- Forum: 8-bit firmwares (https://picbootloader.com/forum/forumdisplay.php?fid=7) +--- Thread: Found unknown device id [solved] (/showthread.php?tid=461) |
Found unknown device id [solved] - Rigor69 - 2011-12-26 Hi! Im in the process of trying out your bootloader. looks to be the most complete loader i have seen for PIC. I have a problem: The Gui reports "Found unknown device id " when connection to my 2-wire RS485 device. I know the HW is OK, because i have run Modbus at the same speed on it. The device is a 12F1840 unit. Configurations are set in code. Through stepping i have concluded that the spbrg is calculated correctly. Any suggestions? This is my settings: Code: ;------------------------------------------------------------------------------ and my user code in the loader: Code: ;------------------------------------------------------------------------------ RE: Found unknown device id - Mikael Gustavsson - 2011-12-26 Hi, Thank you posting in the forum! Your config looks good as far as I can see. The device id constants are 495 in both firmware and GUI so there seem to be some sort of communication/timing problem. Please post the entire output from the GUI or a screenshot. Which RS485 converter do you use on the PIC side? Which rs485 chip do you use on the PIC side? Can you post the txenable enable code from your application? Email is ok. RE: Found unknown device id - Rigor69 - 2011-12-26 Hi ! Thanks for your reply! I too is of the opinion that it is some timing problem, it partly was corrected when I fixed some faulty dip-switch setting in the westermo. I enclose the output of the GUI. The PC side converter is a Westermo MDW-45 The PIC side converters are ISL3294 + ISL3284 Tx enable code is: (in .h file) Code: #define DEN LATA0 //Data enable In .c file Code: DEN = 1; Thanks! Jens RE: Found unknown device id - Mikael Gustavsson - 2011-12-28 Thanks. In the code you have both DEN=1 and TXEN=1 what are those? Running at 1MHz each instruction takes 4us to execute. There are three NOPs in the firmware after the tx enable pin is set high, that equals 12us which should be enough according to your code. You could however insert one or more NOPs just to rule that out. Also insert a NOP or two after the byte has been sent. See below. If possible, try a lower baud rate and/or higher frequency. In ds30loader.asm Code: ;------------------------------------------------------------------------------ RE: Found unknown device id - Rigor69 - 2011-12-30 Hi, Thanks for the answer. The DEN is the direction control of the data. DEN = 1 is Tx and =0 is Rx(from device side) TXEN = 1 is the internal transmitter of PIC beeing enabled. I am nearing a working solution, I can now download hex without errors. The key was that the bootloader has the reciver open all the time, requering the HW to turn off the Rx driver to prevent the sent data to be looped back.(not the case in my HW) I added some small code in the "Send" routine, setting CREN to 0 during transmit. Could be an improvment for future? I still have problems, but now its the app not working correctly after beeing programmed by the bootloader. After using the loader to program the device, neither my app or the loader runs any more. Any suggestions? I enlose the program memory readup after using the loader to load the hex. Thanks, Rigor. RE: Found unknown device id - Mikael Gustavsson - 2011-12-31 Great! So this is a problem for all 2-wire setups. I'd better include your fix. Thanks. It appears you have modified the boot loader size. Did you also use the custom boot loader properties in the GUI? The PIC12/PIC16 firmware doesn't have protection so it is able to overwrite itself. I think that is what has happened. Please attach your hex file and the entire modified boot loader firmware project. RE: Found unknown device id - Rigor69 - 2011-12-31 Hi, Thanks for answering. I think it is perhaps not a problem in all 2-wire setups. Many use the same data enable wire to shut down the reciver on transmit. Then again, there it no point in keeping it open. I include all my files below! Thanks, Rigor. RE: Found unknown device id - Mikael Gustavsson - 2011-12-31 Thanks. You have changed to boot loader size which in this case causes the gui to write the goto to the application in the middle of the boot loader. The next firmware version (1.0.2) will be 256 words big and GUI knows about it so you can change the firmware version in ds30loader.asm: Code: #define VERMAJ 1 ;firmware version major RE: Found unknown device id - Rigor69 - 2012-01-01 Thanks, It works now. I had to uncheck "custom bootloader" in the GUI also. Excellent support Mikael! RE: Found unknown device id - Mikael Gustavsson - 2012-01-02 Great! Thanks for the bug report. |