SourceForge has been redesigned. Learn more.
Close

#150 gpsim-0.26.1 UART transmitter not working

closed-fixed
None
5
2013-03-18
2013-01-26
Anonymous
No

I was having problems debugging some code for 16F877. It was hanging on UART transmit, never setting TXIF.

I therefore tested the p16_tprp.asm code from Microchipt (Appendix A to their UART application note). This did not work either.

After compiling uart.cc with debug set, and examining the output closely, I concluded that the probel lay with two calls to set_break. I changed two occurences of:

get_cycles().set_break(spbrg->get_cpu_cycle(1), this);

to:

get_cycles().set_break(get_cycles().get()+spbrg->get_cpu_cycle(1), this);

After this change the p16_tprp.asm now works as expected.

Discussion

  • Roy Rankin

    Roy Rankin - 2013-03-18
    • assigned_to: nobody --> roy_r_rankin
     
  • Roy Rankin

    Roy Rankin - 2013-03-18

    I have reproduced the problem, but the proposed fix is wrong and breaks the usart regression tests. I am testing a fix which will be available shortly.

     
  • Roy Rankin

    Roy Rankin - 2013-03-18

    Fix in SVN 2193, 2194

     
  • Roy Rankin

    Roy Rankin - 2013-03-18
    • status: open --> closed-fixed
     

Anonymous
Anonymous

Cancel  Add attachments