Page 1
APPLICATION NOTE RX Family, H8S Family R01AN4046EJ0100 Rev.1.00 H8S to RX Migration Guide: Serial Communications Interface Nov 13, 2017 Summary This application note explains how to migrate from the SCI clocked synchronous mode on the H8S Family to the SCI clock synchronous mode on the RX Family, and from the SCI asynchronous mode on the H8S Family to the SCI asynchronous mode on the RX Family.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Contents Points of Difference between Serial Communications Interfaces ....... 3 Points of Difference between Functions .................. 3 Points of Difference between Registers ................... 7 Peripheral Functions Used ..................18 Points of Difference in Clock-Synchronous Serial Communication ......
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference between Serial Communications Interfaces Points of Difference between Functions Table 1.1 lists points of difference between the serial communications interface functions. Table 1.2 lists the functions of the SCI channels on the RX231 Group. Table 1.1 Points of Difference between Serial Communications Interfaces Item RX (RX231)
Page 4
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Item RX (RX231) H8S (H8S/2378) Asynchronous Double-speed Baud rate generator double-speed Not available. mode mode mode is selectable. Multi- Serial communication among multiple processors processor communication function Noise The signal paths from input on the Not available.
Page 5
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Item RX (RX231) H8S (H8S/2378) Extended Start frame • Output of the break field low Not available. serial mode transmission width and generation of an (SCI12 only) interrupt on detection •...
Page 6
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 1.2 Functions of SCI Channels on RX231 Group SCIg SCIh SCI0, SCI1 Item SCI8, SCI9 SCI5 SCI6 SCI12 Asynchronous mode Clock synchronous mode Smart card interface mode Simple I C mode Simple SPI mode...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference between Registers Table 1.3 lists the SCI registers of the RX231 Group and H8S/2378 Group. Table 1.3 SCI registers of RX231 Group and H8S/2378 Group RX (RX231) H8S (H8S/2378) Receive shift register (RSR)
Page 8
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 1.4 lists the points of difference between the SCI registers of the RX231 Group and H8S/2378 Group. Points of difference between registers with equivalent functions, among the registers listed in Table 1.3, are listed. Registers and bit functions not listed in Table 1.4 are identical on the RX231 Group and H8S/2378 Group.
Page 9
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial mode register Parity mode (Only bit names differ.) (SMR) BCP[1:0] BCP1 Base clock pulse Base clock pulse (when SCMR.SMIF BCP0...
Page 10
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial control CKE[1:0] CKE1 Clock enable Clock enable register (SCR) CKE0 [Asynchronous mode] [Asynchronous mode] (when SCMR.SMIF 0 0: On-chip baud rate...
Page 11
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial control CKE[1:0] CKE1 Clock enable Clock enable register (SCR) CKE0 [When SMR.GM = 0] [When SMR.GM = 0] (when SCMR.SMIF 0 0: Output disabled...
Page 12
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial status register TEND Transmit end Transmit end (SSR) [Setting conditions] [Setting conditions] (when SCMR.SMIF •...
Page 13
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial status register TEND Transmit end Transmit end (SSR) [Setting conditions] [Setting conditions] (when SCMR.SMIF •...
Page 14
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Smart card mode CHR1 Character length 2* register (SCMR) available. (Valid in asynchronous mode only) Selects in combination with the SMR.CHR bit.
Page 15
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial extended RXDESEL Asynchronous Start bit edge mode register available. detection select (SEMR)* (Valid in asynchronous mode only)
Page 16
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial extended ACS0 ACS2 Asynchronous mode clock Asynchronous clock source mode register source select selection ACS1 (SEMR)*...
Page 17
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Name Bit Name Description (H8S/ (H8S/ (RX231) 2378) (RX231) 2378) RX (RX231) H8S (H8S/2378) Serial extended ACS0 ACS2 110: Selects 460.784 kbps, mode register which is the average ACS1 (SEMR)* transfer rate exclusively...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Peripheral Functions Used Table 2.1 lists the peripheral functions and modes used in the serial communications interface operation examples. Table 2.1 Peripheral Functions and Modes Used in Serial Communications Interface Operation Examples RX (RX231) H8S (H8S/2378)
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference in Clock-Synchronous Serial Communication This section describes points of difference in clock-synchronous serial communication on the RX231 Group and H8S/2378 Group. Table 3.1 lists preconditions for clock-synchronous serial communication on the RX231 Group and H8S/2378 Group. Table 3.1 Conditions for Clock-Synchronous Serial Communication Transmit/Receive Conditions Item...
Page 20
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface [4] [5] Timing "H" TXD pin Transmit data (1) Transmit data (2) Transmit data (3) Transmit data (1) "L" "H" RXD pin Receive data (1) Receive data (2) Receive data (3) Receive data (1) "L"...
Page 21
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 3.2 Points of Difference in Operation Timing and Processing Details on RX231 Group and H8S/2378 Group (Transmit/Receive in 3-Byte Increments) Timing RX (RX231) H8S (H8S/2378) [1] Before start of When the pin function is set to TXDn, The TXD pin is set as a general I/O the TXD pin is in the high-impedance...
Page 22
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Timing RX (RX231) H8S (H8S/2378) [7] Receive-end interrupt The receive interrupt handler reads The receive interrupt handler reads for final data the received data, and then makes the received data, and then makes the following bit settings to disable the following bit settings to disable interrupts:...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface 3.1.2 Points of Difference in Setting Procedure for Master Transmit/Receive Operation Table 3.3 lists the points of difference in the initial setting procedure for transmit/receive operation. The initial setting procedure shown for the H8S/2378 Group applies to the use of interrupt control mode 2.
Page 24
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Step RX (RX231) H8S (H8S/2378) Enable interrupt IEN(SCI1,TXI1) = 1; requests.* IEN(SCI1,RXI1) = 1; (No processing) IEN(SCI1,ERI1) = 1; /* * Make processor interrupt set_imask_exr(0); priority level setting. (No processing) Enable maskable setpsw_i();...
Page 25
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 3.5 Points of Difference in Receive Interrupt Processing During Transmit/Receive Operation Step RX (RX231) H8S (H8S/2378) Read RDRF flag. if(SCI0.SSR.BIT.RDRF == 1) (No processing) Read receive data. /* Reads receive data from /* Reads receive data from SCI1.RDR register.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference in Master Transmit Operation The points of difference in clock-synchronous master transmit operation are described below. The preconditions are that transmit and transmit-end interrupts are used for transmit processing 3.2.1 Points of Difference in Master Transmit Operation Timing Figure 3.2 shows points of difference in transmit operation timing on the RX231 Group and H8S/2378 Group (for...
Page 27
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 3.6 Points of Difference in Operation Timing and Processing Details on RX231 Group and H8S/2378 Group (Transmission in 3-Byte Increments) Timing RX (RX231) H8S (H8S/2378) [1] Before start of When the pin function is set to TXDn, The TXD pin is set as a general I/O the TXD pin is in the high-impedance...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface 3.2.2 Points of Difference in Setting Procedure for Master Transmit Operation Table 3.7 lists the points of difference in the initial setting procedure for transmit operation. The initial setting procedure shown for the H8S/2378 Group applies to the use of interrupt control mode 2.
Page 29
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Note 1. For information on the module stop function, refer to section 7, Module Stop Function. Note 2. On the RX231 Group peripheral function pin settings are made in the MPC. For details, refer to 9.1, I/O Ports.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference in Slave Receive Operation The points of difference in clock-synchronous slave receive operation are described below. In this example, the preconditions are that receive and receive-error interrupts are used for receive processing, that receive interrupts are delayed by other interrupts during data reception, and that overrun errors are generated.
Page 31
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 3.10 Points of Difference in Operation Timing and Processing Details on RX231 Group and H8S/2378 Group (Reception) Timing RX (RX231) H8S (H8S/2378) [1] Reception enable setting The following bit settings are The following bit settings are made to enable interrupts: made to enable interrupts:...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface 3.3.2 Points of Difference in Setting Procedure for Slave Receive Operation Table 3.11 lists the points of difference in the initial setting procedure for receive operation. The initial setting procedure shown for the H8S/2378 Group applies to the use of interrupt control mode 2.
Page 33
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Note 4. For details of the interrupt priority level setting method, refer to section 6, Points of Difference between Interrupts Note 5. The methods of enabling interrupt requests differ. For details, refer to section 6, Points of Difference between Interrupts Note 6.
Page 34
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 3.13 Points of Difference in ERI Interrupt Processing During Receive Operation Step RX (RX231) H8S (H8S/2378) Read ORER flag. dummy = SCI5.SSR.BIT.ORER; dummy = SCI1.SSR.BIT.ORER; /* * /* * Processing when receive error if(dummy == 1)
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference in Asynchronous Serial Communication This section describes points of difference in asynchronous serial communication on the RX231 Group and H8S/2378 Group. Table 4.1 lists preconditions for asynchronous serial communication on the RX231 Group and H8S/2378 Group. Table 4.1 Conditions for Asynchronous Serial Communication Transmit/Receive Conditions Item...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference in Transmit Operation The points of difference in transmit processing during asynchronous serial communication are described below. The preconditions are that transmit and transmit-end interrupts are used. 4.1.1 Points of Difference in Transmit Operation Timing Figure 4.1 shows points of difference in transmit operation timing on the RX231 Group and H8S/2378 Group (for...
Page 37
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 4.2 Points of Difference in Operation Timing and Processing Details on RX231 Group and H8S/2378 Group (Transmission in 3-Byte Increments) Timing RX (RX231) H8S (H8S/2378) [1] Before start of When the pin function is set to TXDn, The TXD pin is set as a general I/O the TXD pin is in the high-impedance...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface 4.1.2 Points of Difference in Transmit Operation Setting Procedure Table 4.3 lists the points of difference in the initial setting procedure for transmit operation. The initial setting procedure shown for the H8S/2378 Group applies to the use of interrupt control mode 2. Table 4.4 lists points of difference in transmit interrupt processing during transmit operation.
Page 39
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Note 5. For details of the interrupt priority level setting method, refer to section 6, Points of Difference between Interrupts Note 6. The methods of enabling interrupt requests differ. For details, refer to section 6, Points of Difference between Interrupts Table 4.4 Points of Difference in Transmit Interrupt Processing During Transmit Operation Step...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference in Receive Operation The points of difference in receive processing during asynchronous serial communication are described below. In the example of processing when a receive error is generated presented, the preconditions are that receive and receive- error interrupts are used.
Page 41
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 4.6 Points of Difference in Operation Timing and Processing Details on RX231 Group and H8S/2378 Group (Reception in 3-Byte Increments) Timing RX (RX231) H8S (H8S/2378) [1] Reception enable setting The following bit settings are The following bit settings are made to enable interrupts:...
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface 4.2.2 Points of Difference in Receive Operation Setting Procedure Table 4.7 lists the points of difference in the initial setting procedure for receive operation. The initial setting procedure shown for the H8S/2378 Group applies to the use of interrupt control mode 2.
Page 43
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Note 5. For details of the interrupt priority level setting method, refer to section 6, Points of Difference between Interrupts Note 6. The methods of enabling interrupt requests differ. For details, refer to section 6, Points of Difference between Interrupts Note 7.
Page 44
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 4.9 Points of Difference in ERI Interrupt Processing During Receive Operation Step RX (RX231) H8S (H8S/2378) Read ORER flag. dummy = SCI5.SSR.BIT.ORER; dummy = SCI0.SSR.BIT.ORER; /* * /* * Processing when overrun error if(dummy == 1)
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Calculating the Bit Rate Table 5.1 shows the relationship between the BRR register setting value (N) and the bit rate (B). Note that the formulas listed in Table 5.1 are the same for the RX231 Group and H8S/2378 Group. Table 5.1 Relationship between BRR Register Setting Value (N) and Bit Rate (B) Mode RX (RX231)
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Points of Difference between Interrupts In contrast to the H8S/2378 Group, on the RX231 Group, in addition to interrupt enable and interrupt request bits in the registers of each peripheral function, there are interrupt enable and interrupt request bits in the registers of the interrupt controller for the peripheral functions.
Page 47
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Interrupts can be accepted on the RX231 Group when the following conditions are met: • The I flag (PSW.I bit) is set to 1. • The interrupt is enabled in the IER and IPR registers of the ICU. •...
Page 48
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Table 6.3 lists points of difference in the enabling and priority levels of processor interrupts. On the RX231 Group the processor interrupt priority level is 0 (lowest level) by default when the PSW.I bit is set to 1 (interrupt enabled), so maskable interrupts are enabled.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Module Stop Function On the H8S/2378 Group and RX231 Group it is possible to halt the functioning of individual peripheral modules. Power consumption can be reduced by transitioning unused peripheral modules to the module stop state. Modules not listed in Table 7.1 are in the module stop state after a reset.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Register Write Protection Function On the RX231 Group it is possible to protect important registers from being overwritten if program runaway occurs. The protect register (PRCR) is used to specify the registers that are protected by this function. Register protection can be enabled for the clock generation circuit–related registers, flash memory–related registers, operating mode–related registers, low power consumption function–related registers, low-power timer–related registers, LVD–related registers, and software reset register.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Key Points when Migrating from H8S to RX Some points to keep in mind when migrating from the H8S/2378 Group to the RX231 Group are described below. I/O Ports On the RX231 Group it is necessary to make settings to the MPC to assign pins to peripheral function I/O signals.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface I/O Register Macros The macro definitions listed below are contained in the I/O register definition file (iodefine.h) of the RX231 Group. Using macro definitions can make program code easier to read. Table 9.2 lists macro usage examples.
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Embedded Functions On the RX231 Group interrupt functions are provided to implement control register settings or special instructions. To use these embedded functions, include the file machine.h. Table 9.3 lists (examples of) points of difference between control register settings and special instructions on the RX231 Group and H8S/2378 Group.
H8S/2378 Group, H8S/2378R Group Hardware Manual Rev.7.00 (REJ09B0109-0700) RX230 Group and RX231 Group User’s Manual: Hardware Rev.1.10 (R01UH0496EJ0110) (The latest versions can be downloaded from the Renesas Electronics website.) Application Note RX Family, M16C Family Migrating From the M16C Family to the RX Family: Clock Synchronous Serial Data Communications Rev.1.00 (R01AN1927EJ0100)
RX Family, H8S Family H8S to RX Migration Guide: Serial Communications Interface Website and Support Renesas Electronics Website http://www.renesas.com/ Inquiries http://www.renesas.com/contact/ All trademarks and registered trademarks are the property of their respective owners. R01AN4046EJ0100 Rev.1.00 Page 55 of 55 Nov 13, 2017...
Revision History Description Rev. Date Page Summary 1.00 Nov. 13, 2017 First edition issued...
Page 57
General Precautions in the Handling of Microprocessing Unit and Microcontroller Unit Products The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
Page 58
(space and undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas Electronics.
Need help?
Do you have a question about the RX Series and is the answer not in the manual?
Questions and answers