dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: to send data to a remote via RxD1

to send data to a remote via RxD1

From: <>
Date: Wed, 9 Oct 2002 15:03:35 -0700


it looks this topic interests a lot of people, so I may give you a suggestion :

Reading the SH703x hardware manual, I found something which could be of interest for you. The TPC (chapter 11) can provide pulse outputs by using the 16-bit integrated timer pulse unit (ITU) as a time base. The TPC pulse outputs can be enabled or disabled separately. In your case, you just need to enable TP10 which is the same pin than RxD1 to use it for outputting your data to a remote. DMAC can be used in conjunction too.

So, to send a packet, you set PB10 as TP10 instead of RxD1, activate your chosen ITU timer with interruption IMIA (you need a handler to give use which bit to send at each interrupt).

How to set for ordinary TPC output ?

1. select GRA as the output compare register (output disable) with the imer I/O control register (TIOR).
2. set the TPC output trigger cycle.
3. select the counter clock with TPSC2-TPSC0 bits in the timer control register (TCR). Select the counter clear sources with CCLR1-CCLR0 bits.
4. set the timer interrupt enable register (TIER) to enable IMIA interrupts. Transfers to NDR ca also be set using the DMAC.
5. set the initial output value in the I/O port data register to be used by the TPC.
6. set the I/O port control register to be used by the TPC as the TP pin function - here TP10.
7. set to 1 the bit that performs TPC output to the next data enable register (NDER) - here TP10, register NDERB, bit NDER10.
8. select the ITU compare match that will be the TPC output trigger using the TPC output control register (TPCR).
9. set the next TPC output value in NDR - here TP10, register NDRB, bit NDR10.
10. set 1 in the STR bit of the timer start register (TSTR) and start the timer counter.
11. set the next output value in NDR whenever an IMIA interrupt is generated.

Get your free encrypted email at
Received on 2002-10-10

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy