2007-05-03 04:33 AM
2005-06-28 11:16 PM
I have a ST10F276-CAA with Keil.
I try to use the XASC. Here you can see my configuration. The pb is that I have no Serial tansmit interrupt (0x42), when i execute XS1TBUF = c; . I able to simulate it with the debuger : Peripherals --> Interrupt system --> XP2INT clic on request. In the Startup : XPERCON = 0x06DC // I have verify vith the debuger Here is the configuration of the XASC : XS1PORT = 0x0018; XS1CON = 0x8011; XS1CONSET = 0x8011; // receive on XP1IC XIR1SEL =0x8000; XP1IC = (0X0005<// transmit on XP2IC XIR2SEL =0x2000; XP2IC = (0x0005<XP1IE = 1; XP2IE = 1; void serial_transmit_1 (void) interrupt 0x42 { } Could somebody help me. Thank you.2005-06-30 04:54 AM
Thank you but teh pb isn't solved.
when I wright XP2IR = 1, I jump in the interrupt (0x42). But the instruction XS1TBUF = c (c is a char) generate any XP2 interrupt request. Until to now, I haven't try this soft on the target, I use the keil debuger. Do you think that the pb come from the debuger ? regards,2005-06-30 05:59 AM
Hello Pierrot,
It is easy to adapt the software code to the Keil tool, just: - change the ''interrupt( 0x42) void xasc_transmit(void)'' by '' void xasc_transmit(void) interrupt (0x42)'' . && - change main() by void main(void) Now, you can try the soft on the target . An other issue: in your own code, there is some thing missing: the baudrate definition (XS1BG register configuration). Regards, Najoua. [ This message was edited by: Najoua on 30-06-2005 18:30 ]2007-05-03 04:33 AM
I had tested the example code provided by Neila. After the instruction XP2IR = 1; , i expected the control to jump to the ISR.
Instead it was spending the rest of its life in the infinite while loop. After this i included an additonal statement of writing a character onto the XS1TBUF followed by a _nop_(). Now when i debug, After executing the statements: XP2IR =1; XS1TBUF = 'A'; _nop_(); Right after _nop_() is executed it jumps to the ISR. Thereafter the control wisely jumps into ISR as requd. Can anyone explain this behaviour? Iam using Keil uVision 3 & is using a DProbeST10 Emulator(with XPER derivative) Thanks in advance, Rajiv