2011-11-19, 17:40:07
(This post was last modified: 2012-12-22, 14:07:00 by Mikael Gustavsson.)
Hi dear Mikael, hi dear all!
I have the next problem:
When I loading my program to the hardware, the flash write is always good, but the end of write config words is always fail.
I get the next message in debug mode:
...
Write flash succeded
...
Writing config word 3 byte 0 (0x007B)...ok
Writing config word 3 byte 1 (0x00FF)...ok
Writing config word 4 byte 0 (0x00BE)...ok
Writing config word 4 byte 1 (0x00FF)...The hardware detected a framing error.unknown response 0xAA, 1 try
Write configs failed
Closing port
Tx 18,7kB / Rx 120 bytes / 6,8s
Write failed
After that, my program is running almost perfectly, but the UART can not receive. (More precisely, the UART can receive very rarely)
If I put a line into my code, and I send a 0x55 periodically from the main loop, the Baud rate is 38400 bps. As accurate, as an atomic clock.
I watched the signal forms with oscilloscope, Rx, Tx were totally good;
Loader version: 1.4.6
firmware version: 4.0.0 March 2011
uC: dsPIC33FJ32GP302
FCY in loader: 5,5295 Mc (11,059Mc Xtal with te original loader configs)
FCY in my program: 22,118Mc (11,059Mc Xtal with PLL)
Baud rate: 38400 bps
I do not use Tx enable signal
The faulty last response 0xFE at 9600 bps, 0x54 at 57600 bps, and 0xE0 at 115200 bps
I have to use different config settings in the loader, and in my program,
because I need Fosc=44,236 Mc / FCY=22,118 Mc.
If I would use the same settings in the loader, the VCO frequency would be 276,475 Mc because of the default settings of PLL registers.
I don't want to differ so hard from the datasheet. (enabled max. VCO freq.: 200 Mc)
... Ooops! Maybe, I would to set on the PLL registers from the ds30loader.s ... ?
Thanks for any idea in advance!
Gyuri
I have the next problem:
When I loading my program to the hardware, the flash write is always good, but the end of write config words is always fail.
I get the next message in debug mode:
...
Write flash succeded
...
Writing config word 3 byte 0 (0x007B)...ok
Writing config word 3 byte 1 (0x00FF)...ok
Writing config word 4 byte 0 (0x00BE)...ok
Writing config word 4 byte 1 (0x00FF)...The hardware detected a framing error.unknown response 0xAA, 1 try
Write configs failed
Closing port
Tx 18,7kB / Rx 120 bytes / 6,8s
Write failed
After that, my program is running almost perfectly, but the UART can not receive. (More precisely, the UART can receive very rarely)
If I put a line into my code, and I send a 0x55 periodically from the main loop, the Baud rate is 38400 bps. As accurate, as an atomic clock.
I watched the signal forms with oscilloscope, Rx, Tx were totally good;
Loader version: 1.4.6
firmware version: 4.0.0 March 2011
uC: dsPIC33FJ32GP302
FCY in loader: 5,5295 Mc (11,059Mc Xtal with te original loader configs)
FCY in my program: 22,118Mc (11,059Mc Xtal with PLL)
Baud rate: 38400 bps
I do not use Tx enable signal
The faulty last response 0xFE at 9600 bps, 0x54 at 57600 bps, and 0xE0 at 115200 bps
I have to use different config settings in the loader, and in my program,
because I need Fosc=44,236 Mc / FCY=22,118 Mc.
If I would use the same settings in the loader, the VCO frequency would be 276,475 Mc because of the default settings of PLL registers.
I don't want to differ so hard from the datasheet. (enabled max. VCO freq.: 200 Mc)
... Ooops! Maybe, I would to set on the PLL registers from the ds30loader.s ... ?
Thanks for any idea in advance!
Gyuri