Indeed, I ran through the 7721 manual, which indicates that SIOF is handled by Port S. Port S has two registers, PSCR (control register) and PSDR (data register). The RxD and TxD lines are pins 1 and 2 of Port S; the following code sets both lines of the port to "output" and repeatedly toggles them high and low:
Code:
Unfortunately, while this doesn't crash, a multimeter attached to the Prizm's serial port shows nothing in particular happening. The ring stays at 0.000V relative to the base, while the tip stays at a solid 2.647V relative to the base.
I therefore took a look at the 7730 manual. Unlike the 7721, where both pins 1 and 2 of Port S are bidirectional and can be set output, input with pullup, or input without pullup, the 7730 has pin 2 bidirectional but pin 1 as unidirectional input. For my future reference to modify my testing program to see if the SIOF module is a 7730 module:
Code:
Edit: Interesting, didn't get any activity on the serial port from that, either.
Code:
#define PSCR ((unsigned short int *)0xA405011C) // 16 bits
#define PSDR ((unsigned char*) 0xA405015C) // 8 bits
*PSCR = (*PSCR & 0xFFC3) | 0x0014; //set PS2, PS1 to output
while(1) {
*PSDR = (*PSDR & 0xF9) | 0x00;
int timethistick = RTC_GetTicks();
while(timethistick + 128 > RTC_GetTicks());
*PSDR = (*PSDR & 0xF9) | 0x06;
timethistick = RTC_GetTicks();
while(timethistick + 128 > RTC_GetTicks());
}
Unfortunately, while this doesn't crash, a multimeter attached to the Prizm's serial port shows nothing in particular happening. The ring stays at 0.000V relative to the base, while the tip stays at a solid 2.647V relative to the base.
I therefore took a look at the 7730 manual. Unlike the 7721, where both pins 1 and 2 of Port S are bidirectional and can be set output, input with pullup, or input without pullup, the 7730 has pin 2 bidirectional but pin 1 as unidirectional input. For my future reference to modify my testing program to see if the SIOF module is a 7730 module:
Code:
Port S data register PSDR R/W H'A405 009E (8 bits)
Port S control register PSCR R/W H'A405001E (16 bits)
Edit: Interesting, didn't get any activity on the serial port from that, either.