hartmannathan commented on code in PR #17009: URL: https://github.com/apache/nuttx/pull/17009#discussion_r2342722666
########## Documentation/platforms/renesas/m16c/boards/skp16c26/index.rst: ########## @@ -2,5 +2,136 @@ SKP16C26 ======== -.. include:: README.txt - :literal: +.. tags:: arch:renesas + +1. The buildroot package can be used to build an M16C toolchain. The toolchain + buildroot can be downloaded from buildroot in the NuttX GIT. Insructions for + building the toolchain are provided below. + + However, the target cannot be built because the GNU m16c-nuttx-elf-ld link + fails with the following message: + + .. code:: console + + m32c-nuttx-elf-ld: BFD (GNU Binutils) 2.19 assertion fail /home/Owner/projects/nuttx/buildroot/toolchain_build_m32c/binutils-2.19/bfd/elf32-m32c.c:482 + + Where the reference line is: + + .. code:: c + + /* If the symbol is out of range for a 16-bit address, + we must have allocated a plt entry. */ + BFD_ASSERT (*plt_offset != (bfd_vma) -1); + + No workaround is known at this time. This is a show stopper for M16C. + +2. A supported version of the M16C toolchain is available here: + + http://www.kpitgnutools.com/index.php + + This download is free but requires registration. Unfortunately, this v0901 of + this toolchain shows the same behavior: + + .. code:: console + + c:\Hew3\Tools\KPIT Cummins\GNUM16CM32C-ELF\v0901\m32c-elf\bin\m32c-elf-ld.exe: BFD (GNU Binutils) 2.19-GNUM16CM32C_v0901 assertion fail /home/kpit/fsfsrc/binutils-2.19/bfd/elf32-m32c.c:482 + + It is possible that this error message may be telling me -- a very roundabout way -- + that I have exceeded the FLASH region, but I think that unlikely (it is difficult + to know if the link does not complete gracefully). + +Building the R8C/M16C/M32C GNU Toolchain Using Buildroot +======================================================== + +.. warning:: + + See the toolchain issues above -- you may not want to waste your time. + +1. CD to the correct directory. + + Change to the directory just above the NuttX installation. If <nuttx-dir> is + where NuttX is installed, then cd to <nuttx-dir>/.. + +2. Get and Install the buildroot Module + + a. Using a release tarball: + + .. code:: console + + $ cd <nuttx-dir>/.. + + Download the appropriate buildroot package. + unpack the buildroot package + rename the directory to buildroot + + b. Using GIT + + Check out the buildroot module. GIT checkout instructions: + + .. code:: console + + $ git clone https://pataco...@bitbucket.org/nuttx/buildroot.git buildroot + + Make the archive directory: + + .. code:: console + + $ mkdir archive + + The ``<nuttx-dir>/../buildroot`` is where the toolchain is built; + The ``<nuttx-dir>/../archive`` directory is where toolchain sources will be downloaded. + +3. Make sure that NuttX is configured + + .. code:: console + + $ cd <nuttx-dir> + $ tools/configure.sh <nuttx-configuration> + +4. Configure and Make the buildroot + + .. code:: console + + $ cd <buildroot-dir> + $ cp boards/m32c-defconfig-4.2.4 .config + $ make oldconfig + $ make + + This will download the large source packages for the toolchain and build the toolchain. + The resulting binaries will be under buildroot/build_m32c. There will also be a + large build directory called toolchain_build_m32c; this directory can be removed once + the build completes successfully. + +Cygwin GCC BUILD NOTES +====================== + +On Cygwin, the buildroot 'make' command will fail with an error like: + +.. code:: console + + build/genchecksum cc1-dummy > cc1-checksum.c + opening cc1-dummy: No such file or directory + +This is caused because on Cygwin, host executables will be generated with the extension .exe +and, apparently, the make variable "exeext" is set incorrectly. A work around after the Review Comment: ```suggestion and, apparently, the make variable "exeext" is set incorrectly. A workaround after the ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial Review Comment: ```suggestion RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested (SCI8, which is the serial ``` ########## Documentation/platforms/renesas/m16c/boards/skp16c26/index.rst: ########## @@ -2,5 +2,136 @@ SKP16C26 ======== -.. include:: README.txt - :literal: +.. tags:: arch:renesas + +1. The buildroot package can be used to build an M16C toolchain. The toolchain + buildroot can be downloaded from buildroot in the NuttX GIT. Insructions for Review Comment: ```suggestion buildroot can be downloaded from buildroot in the NuttX GIT. Instructions for ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial +console). Only SCI8 port can be tested which is connected to USB Serial port. + +Serial ports SCI1, SCI2, SCI9-SCI12, cannot be tested because they are multiplexed to other Rx65N controller interfaces. + +Following SCI ports are configured w.r.t RX65N pin configuration + +SCI1 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PF2 RXD1 + PF1 TXD1 +------------ + +SCI2 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + P52 RXD2 + P50 TXD2 +------------ + +SCI8 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PJ1 RXD8 + PJ2 TXD8 +------------ + +Serial Connection Configuration +------------------------------- + +1. RSK2MB board needs to be connected to PC, using USB cable(One end of which is connected to PC, other end connected to + USB serial port on H/W board). + +2. RSK USB Serial Driver needs to be downloaded on PC side. + +3. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N RSK2MB board has 2 Power LED's(PowerLED5 LED_G, PowerLED3 LED_G) and 4 user LED's (LED_G, LED_O, LED_R, +LED_R). + +If enabled 4 User LED's are simply turned on when the board boots successfully, and is blinking on panic / assertion +failed. + +Networking +========== + +Ethernet Connections +-------------------- + +------ ----------- +RX65N +RSK2MB Ethernet +Pin Function +------ ----------- +PC4 ET0_TX_CLK +P76 ET0_RX_CLK +P80 ET0_TX_EN +PC6 ET0_ETXD3 +PC5 ET0_ETXD2 +P82 ET0_ETXD1 +P81 ET0_ETXD0 +PC3 ET0_TX_ER +PC2 ET0_RX_DV +PC0 ET0_ERXD3 +PC1 ET0_ERXD2 +P74 ET0_ERXD1 +P75 ET0_ERXD0 +P77 ET0_RX_ER +P83 ET0_CRS +PC7 ET0_COL +P72 ET0_MDC +P71 ET0_MDIO +P54 ET0_LINKSTA +------ ----------- + +USB Device +----------- + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +NuttX Configuration Options +--------------------------- + +The following configurations, need to be enabled for network. + +``CONFIG_RX65N_EMAC=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0_PHYSR=30``: Address of PHY status register +``CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18``: Needed for PHY CHIP +``CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10FD=0x14``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c``: " " " " " " +``CONFIG_RX65N_EMAC0_RMII=y`` +``CONFIG_RX65N_EMAC0_PHYADDR=0``: PHY is at address 1 +``CONFIG_SCHED_WORKQUEUE=y``: Work queue support is needed +``CONFIG_SCHED_HPWORK=y``: High Priority Work queue support +``CONFIG_SCHED_LPWORK=y``: Low Priority Work queue support + +Using the network with NSH +-------------------------- + +The IP address is configured using DHCP, using the below mentioned configurations : + +* ``CONFIG_NETUTILS_DHCPC=y`` +* ``CONFIG_NETUTILS_DHCPD=y`` +* ``CONFIG_NSH_DHCPC=y`` +* ``CONFIG_NETINIT_DHCPC=y`` + +.. code:: console + + nsh> ifconfig + eth0 HWaddr 00:e0:de:ad:be:ef at UP + IPaddr:10.75.24.53 DRaddr:10.75.24.1 Mask:255.255.254.0 + +You can use ping to test for connectivity to the host (Careful, Window firewalls usually block ping-related ICMP +traffic). On the target side, you can: + +.. code:: console + + nsh> ping 10.75.24.250 + PING 10.75.24.250 56 bytes of data + 56 bytes from 10.75.24.250: icmp_seq=1 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=2 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=3 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=4 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=5 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=6 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=7 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=8 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=9 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=10 time=0 ms + 10 packets transmitted, 10 received, 0% packet loss, time 10100 ms + +On the host side, you should also be able to ping the RX65N-RSK2MB: + +.. code:: console + + $ ping 10.75.24.53 + +Configure UDP blaster application as mentioned below: + +* ``CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801`` (10.75.24.1) ------> Gateway IP +* ``CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00`` (255.255.254.0) --------> Netmask +* ``CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b`` (10.75.24.155) ---------> Target IP + +RSPI +---- + +For RX65N RSK2MB board, Following pin is configured for all channels in JA3. +Channel0: Pin number 7 and 8 in JA3 is used for MOSIA and MISOA respectively +Channel1: Pin number 35 and 36 in JA3 is used for MOSIB and MISOB respectively +Channel2: Pin number 18 and 19 in JA3 is used for MOSIC and MISOC respectively +and for enabling these pin need to select DSW-SEL0 by making off SW4-4 + +USB Host Jumpers +================ + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 1 & Pin 2 +J16 Short Pin 2 & Pin 3 + +USB Device Jumpers +================== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +RTC +=== + +NuttX Configurations +-------------------- + +The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled. + +RTC Testing +----------- + +The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed as part of RTC testing. + +The following configurations are to be enabled as part of testing RTC examples. + +* ``CONFIG_EXAMPLES_ALARM`` +* ``CONFIG_EXAMPLES_PERIODIC`` +* ``CONFIG_EXAMPLES_CARRY`` + +USB Device Configurations +------------------------- + +The following configurations need to be enabled for USB Device + +* ``CONFIG_USBDEV`` +* ``CONFIG_CDCACM`` +* ``CONFIG_STDIO_BUFFER_SIZE=64`` +* ``CONFIG_STDIO_LINEBUFFER`` + +USB Device Testing +------------------ + +The following testing is executed as part of USB Device testing on RX65N target for GRROSE board + +.. code:: console + + $ echo "This is a test for USB Device" > /dev/ttyACM0 + $ xd 0 0x20000 > /dev/ttyACM0 + +The output of the commands mentioned above should be seen on the USB Device COM port on teraterm + +RSPI Configurations +------------------- + +The following configurations need to be enabled for RSPI + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +RSPI Testing +------------ + +The following testing is executed as part of RSPI testing on RX65N target for RSK2MB board + +On RSK2MB board, all three channels 0, 1 and 2 has been brought out and tested. + +Following command can be used for testing RSPI communication to slave device. + +.. code:: console + + $ spi exch -b 0 -x 4 aabbccdd + +where b is bus number and x is Number of word to exchange. Review Comment: ```suggestion where b is bus number and x is number of words to exchange. ``` ########## Documentation/platforms/renesas/sh1/boards/us7032evb1/index.rst: ########## @@ -2,5 +2,118 @@ US7032EVB1 ========== -.. include:: README.txt - :literal: +.. tags:: arch:renesas, experimental + +.. warning:: + + The port is basically complete and many examples run correctly. However, + there are remaining instabilities that make the port un-usable. The nature + of these is not understood; the behavior is that certain SH-1 instructions + stop working as advertised. This could be a silicon problem, some pipeline + issue that is not handled properly by the gcc 3.4.5 toolchain (which has very + limited SH-1 support to begin with), or perhaps with the CMON debugger. At + any rate, I have exhausted all of the energy that I am willing to put into + this cool old processor for the time being. + +Toolchain +========= + +A GNU GCC-based toolchain is assumed. The PATH environment variable should be +modified to point to the correct path to the SH toolchain (if different from the +default). + +If you have no SH toolchain, one can be downloaded from the NuttX Bitbucket +download site (https://bitbucket.org/nuttx/buildroot/downloads/). + +1. You must have already configured NuttX in <some-dir>nuttx. + +.. code:: console + + $ tools/configure.sh us7032evb1:<sub-dir> + +2. Download the latest buildroot package into <some-dir> + +3. unpack + +4. + .. code:: console + + $ cd <some-dir>/buildroot + $ cp boards/sh-defconfig .config + $ make oldconfig + $ make + +5. Make sure that the PATH variable includes the path to the newly built + binaries. + +shterm +====== + +The USB7032EVB1 supports CMON in PROM. CMON requires special serial +interactions in order to upload and download program files. Therefore, a +standard terminal emulation program (such as minicom) cannot be used. + +The shterm subdirectory contains a small terminal emulation program that +supports these special interactions for file transfers. + +Configurations +============== + +Each SH-1 configuration is maintained in a sub-directory and can be selected as +follows: + +.. code:: console + + $ tools/configure.sh us7032evb1:<subdir> + +Where <subdir> is one of the configuration sub-directories described in +the following paragraph. + +ostest +------ + +This configuration directory, performs a simple OS test using examples/ostest. Review Comment: ```suggestion This configuration directory, performs a simple OS test using examples/ostest in the nuttx-apps repository. ``` ########## Documentation/platforms/renesas/m16c/boards/skp16c26/index.rst: ########## @@ -2,5 +2,136 @@ SKP16C26 ======== -.. include:: README.txt - :literal: +.. tags:: arch:renesas + +1. The buildroot package can be used to build an M16C toolchain. The toolchain + buildroot can be downloaded from buildroot in the NuttX GIT. Insructions for + building the toolchain are provided below. + + However, the target cannot be built because the GNU m16c-nuttx-elf-ld link + fails with the following message: + + .. code:: console + + m32c-nuttx-elf-ld: BFD (GNU Binutils) 2.19 assertion fail /home/Owner/projects/nuttx/buildroot/toolchain_build_m32c/binutils-2.19/bfd/elf32-m32c.c:482 + + Where the reference line is: + + .. code:: c + + /* If the symbol is out of range for a 16-bit address, + we must have allocated a plt entry. */ + BFD_ASSERT (*plt_offset != (bfd_vma) -1); + + No workaround is known at this time. This is a show stopper for M16C. + +2. A supported version of the M16C toolchain is available here: + + http://www.kpitgnutools.com/index.php + + This download is free but requires registration. Unfortunately, this v0901 of + this toolchain shows the same behavior: + + .. code:: console + + c:\Hew3\Tools\KPIT Cummins\GNUM16CM32C-ELF\v0901\m32c-elf\bin\m32c-elf-ld.exe: BFD (GNU Binutils) 2.19-GNUM16CM32C_v0901 assertion fail /home/kpit/fsfsrc/binutils-2.19/bfd/elf32-m32c.c:482 + + It is possible that this error message may be telling me -- a very roundabout way -- + that I have exceeded the FLASH region, but I think that unlikely (it is difficult + to know if the link does not complete gracefully). + +Building the R8C/M16C/M32C GNU Toolchain Using Buildroot +======================================================== + +.. warning:: + + See the toolchain issues above -- you may not want to waste your time. + +1. CD to the correct directory. + + Change to the directory just above the NuttX installation. If <nuttx-dir> is + where NuttX is installed, then cd to <nuttx-dir>/.. + +2. Get and Install the buildroot Module + + a. Using a release tarball: + + .. code:: console + + $ cd <nuttx-dir>/.. + + Download the appropriate buildroot package. + unpack the buildroot package + rename the directory to buildroot + + b. Using GIT + + Check out the buildroot module. GIT checkout instructions: + + .. code:: console + + $ git clone https://pataco...@bitbucket.org/nuttx/buildroot.git buildroot + + Make the archive directory: + + .. code:: console + + $ mkdir archive + + The ``<nuttx-dir>/../buildroot`` is where the toolchain is built; + The ``<nuttx-dir>/../archive`` directory is where toolchain sources will be downloaded. + +3. Make sure that NuttX is configured + + .. code:: console + + $ cd <nuttx-dir> + $ tools/configure.sh <nuttx-configuration> + +4. Configure and Make the buildroot + + .. code:: console + + $ cd <buildroot-dir> + $ cp boards/m32c-defconfig-4.2.4 .config + $ make oldconfig + $ make + + This will download the large source packages for the toolchain and build the toolchain. + The resulting binaries will be under buildroot/build_m32c. There will also be a + large build directory called toolchain_build_m32c; this directory can be removed once + the build completes successfully. + +Cygwin GCC BUILD NOTES +====================== + +On Cygwin, the buildroot 'make' command will fail with an error like: + +.. code:: console + + build/genchecksum cc1-dummy > cc1-checksum.c + opening cc1-dummy: No such file or directory + +This is caused because on Cygwin, host executables will be generated with the extension .exe +and, apparently, the make variable "exeext" is set incorrectly. A work around after the +above occurs is: + +.. code:: console + + $ cd toolchain_build_m32c/gcc-4.2.4-initial/gcc # Go to the directory where error occurred + $ mv cc1-dummy.exe cc1-dummy # Rename the executable without .exe + $ rm cc1-checksum.c # Get rid of the bad generated file + +Then resume the buildroot make: + +.. code:: console + + $ cd - # Back to the buildroot make directory + $ make # Restart the build + +GCC is built twice. First a initial, "bootstrap" GCC is produced in Review Comment: ```suggestion GCC is built twice. First an initial, "bootstrap" GCC is produced in ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-grrose/index.rst: ########## @@ -2,8 +2,587 @@ RX65N GRROSE ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This documentation discusses the port of NuttX to “GR-ROSE” board produced by +Gadget Renesas. This board features the RX65N (R5F565NEHDFP 100pin QFP). + +Board Features +============== + +- Micro controller - RX65N (R5F565NEHDFP 100pin QFP) RXv2 core [34 CoreMark/mA] +- ROM/RAM - 2MB/640KB +- Operating Frequency - 120MHz(12MHz 10 Multiplication) +- RTC Clock - 32.768kHz +- Sensors - Temperature(inside MCU) +- ROS I/F - Ethernet, USB(rosserial) +- Serial Servo I/F - TTL x 4, RS-485 x 1 +- Analog I/F - ADC(12bit) x 6, DAC x 1 +- Wireless - IEEE 802.11b/g/n +- PMOD I/F - 1 (I2C, SPI, UART) +- External power supply - USB VBUS or 4.5V~18V +- Supply to external - 3.3V, 5V + +See the RX65N GRROSE website for further information about this board: +http://gadget.renesas.com/en/product/rose.html + +Serial Console +============== + +RX65N GRROSE supports 12 serial ports (SCI0 - SCI12), however only 5 ports can be tested(SCI0, SCI1, SCI2, +SCI5 & SCI6). + +Please find the pin configurations for SCI0, SCI1, SCI2, SCI5 & SCI6 + +SCI0 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P21 RXD0 + P20 TXD0 +------------ + +SCI1 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P30 RXD1 + P26 TXD1 +------------ + +SCI2 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P12 RXD2 + P13 TXD2 +------------ + +SCI3 Pin Configuration (connected to WiFi module): + +------------ +RX65N GRROSE + Function +------------ + P25 RXD3 + P23 TXD3 +------------ + +SCI5 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + PC2 RXD5 + PC3 TXD5 +------------ + +SCI6 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P33 RXD6 + P32 TXD6 +------------ + +SCI8 Pin Configuration (Half duplication mode with RS485 driver): + +------------------------------ +RX65N GRROSE + Function +------------------------------ + PC6 RXD8 + PC7 TXD8 + PC5 Direction (L=TX, H=RX) +------------------------------ + +Serial Connection Configuration +------------------------------- + +1. GRROSE board needs to be connected to PC terminal, using USB to Serial Chip. +2. Connect TX of USB to serial chip to RX of SCIX(0,1,2,5,6) +3. Connect RX of USB to serial chip to TX of SCIX(0,1,2,5,6) +4. Connect GND to GND pin. +5. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N GRROSE board has 2 LED's, 1 Power LED(LED3) and 2 User LED's(LED1, +LED2),which are enabled through software. + +If enabled the LED is simply turned on when the board boots successfully, and is +blinking on panic / assertion failed. + +Networking +========== + +Ethernet Connections +-------------------- + +---------- --------- +RX65N +GRROSE Ethernet +Pin Function +---------- --------- +PA4 ET0_MDC +PA3 ET0_MDIO +PB2 REF50CK0 +PB7 RMII0_CRS_DV +PB1 RMII0_RXD0 +PB0 RMII0_RXD1 +PB3 RMII0_RX_ER +PB5 RMII0_ETXD0 +PB6 RMII0_ETXD1 +PB4 RMII0_TXD_EN +PA5 ET0_LINKSTA +PA6_ET_RST ETHER reset +---------- ----------- + +NuttX Configurations +==================== + +The following configurations, need to be enabled for network. + +* ``CONFIG_RX65N_EMAC=y``: Enable the EMAC Peripheral for RX65N +* ``CONFIG_RX65N_EMAC0=y``: Enable the EMAC Peripheral for RX65N +* ``CONFIG_RX65N_EMAC0_PHYSR=30``: Address of PHY status register on LAN8720A +* ``CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18``: Needed for LAN8720A +* ``CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08`` +* ``CONFIG_RX65N_EMAC0_PHYSR_10FD=0x14`` +* ``CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04`` +* ``CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y`` +* ``CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c`` +* ``CONFIG_RX65N_EMAC0_RMII=y`` +* ``CONFIG_RX65N_EMAC0_PHYADDR=0``: LAN8720A PHY is at address 1 + +* ``CONFIG_SCHED_WORKQUEUE=y``: Work queue support is needed +* ``CONFIG_SCHED_HPWORK=y``: High Priority Work queue support +* ``CONFIG_SCHED_LPWORK=y``: Low Priority Work queue support + +Using the network with NSH +-------------------------- + +The IP address is configured using DHCP, using the below mentioned configurations: + +* ``CONFIG_NETUTILS_DHCPC=y`` +* ``CONFIG_NETUTILS_DHCPD=y`` +* ``CONFIG_NSH_DHCPC=y`` +* ``CONFIG_NETINIT_DHCPC=y`` + +.. code:: console + + nsh> ifconfig + eth0 HWaddr 00:e0:de:ad:be:ef at UP + IPaddr:10.75.24.53 DRaddr:10.75.24.1 Mask:255.255.254.0 + +You can use ping to test for connectivity to the host (Careful, Window firewalls +usually block ping-related ICMP traffic). On the target side, you can: + +.. code:: console + + nsh> ping 10.75.24.250 + PING 10.75.24.250 56 bytes of data + 56 bytes from 10.75.24.250: icmp_seq=1 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=2 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=3 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=4 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=5 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=6 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=7 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=8 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=9 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=10 time=0 ms + 10 packets transmitted, 10 received, 0% packet loss, time 10100 ms + +On the host side, you should also be able to ping the RX65N-GRROSE: + +.. code:: console + + $ ping 10.75.24.53 + +Configure UDP blaster application as mentioned below: + +.. code:: text + + CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801 (10.75.24.1) ------> Gateway IP + CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00 (255.255.254.0) --------> Netmask + CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b (10.75.24.155) ---------> Target IP + +RSPI +---- + +For GRROSE board only channel 1 can be tested since RSPI channel1 pinout is only +brought out as Pin number 2 and 3 in CN4 is used for MOSIB and MISOB +respectively. + +USB Host +======== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 1 & Pin 2 +J16 Short Pin 2 & Pin 3 + +USB Device +========== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +RTC +=== + +NuttX Configurations +-------------------- + +The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled. + +RTC Testing +----------- + +The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed +as part of RTC testing. + +The following configurations are to be enabled as part of testing RTC examples. + +* ``CONFIG_EXAMPLES_ALARM`` +* ``CONFIG_EXAMPLES_PERIODIC`` +* ``CONFIG_EXAMPLES_CARRY`` + +USB Device Configurations +-------------------------- + +The following configurations need to be enabled for USB Device + +* ``CONFIG_USBDEV`` +* ``CONFIG_CDCACM`` +* ``CONFIG_STDIO_BUFFER_SIZE=64`` +* ``CONFIG_STDIO_LINEBUFFER`` + +USB Device Testing +------------------------ + +The following testing is executed as part of USB Device testing on RX65N target +for GRROSE board: + +.. code:: console + + $ echo "This is a test for USB Device" > /dev/ttyACM0 + $ xd 0 0x20000 > /dev/ttyACM0 + +The output of the commands mentioned above should be seen on the USB Device COM +port on teraterm + +RSPI Configurations +------------------- + +The following configurations need to be enabled for RSPI + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +RSPI Testing +------------ + +The following testing is executed as part of RSPI testing on RX65N target for +GRROSE board + +On GRROSE board only channel 1 can be tested since RSPI channel1 pinout is only +brought out. + +The following command can be used for testing RSPI communication to the slave +device: + +.. code:: console + + $ spi exch -b 0 -x 4 aabbccdd + +where b is bus number and x is Number of word to exchange. Review Comment: ```suggestion where b is bus number and x is number of words to exchange. ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-grrose/index.rst: ########## @@ -2,8 +2,587 @@ RX65N GRROSE ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This documentation discusses the port of NuttX to “GR-ROSE” board produced by +Gadget Renesas. This board features the RX65N (R5F565NEHDFP 100pin QFP). + +Board Features +============== + +- Micro controller - RX65N (R5F565NEHDFP 100pin QFP) RXv2 core [34 CoreMark/mA] +- ROM/RAM - 2MB/640KB +- Operating Frequency - 120MHz(12MHz 10 Multiplication) +- RTC Clock - 32.768kHz +- Sensors - Temperature(inside MCU) +- ROS I/F - Ethernet, USB(rosserial) +- Serial Servo I/F - TTL x 4, RS-485 x 1 +- Analog I/F - ADC(12bit) x 6, DAC x 1 +- Wireless - IEEE 802.11b/g/n +- PMOD I/F - 1 (I2C, SPI, UART) +- External power supply - USB VBUS or 4.5V~18V +- Supply to external - 3.3V, 5V + +See the RX65N GRROSE website for further information about this board: +http://gadget.renesas.com/en/product/rose.html + +Serial Console +============== + +RX65N GRROSE supports 12 serial ports (SCI0 - SCI12), however only 5 ports can be tested(SCI0, SCI1, SCI2, +SCI5 & SCI6). + +Please find the pin configurations for SCI0, SCI1, SCI2, SCI5 & SCI6 + +SCI0 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P21 RXD0 + P20 TXD0 +------------ + +SCI1 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P30 RXD1 + P26 TXD1 +------------ + +SCI2 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P12 RXD2 + P13 TXD2 +------------ + +SCI3 Pin Configuration (connected to WiFi module): + +------------ +RX65N GRROSE + Function +------------ + P25 RXD3 + P23 TXD3 +------------ + +SCI5 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + PC2 RXD5 + PC3 TXD5 +------------ + +SCI6 Pin Configuration : + +------------ +RX65N GRROSE + Function +------------ + P33 RXD6 + P32 TXD6 +------------ + +SCI8 Pin Configuration (Half duplication mode with RS485 driver): + +------------------------------ +RX65N GRROSE + Function +------------------------------ + PC6 RXD8 + PC7 TXD8 + PC5 Direction (L=TX, H=RX) +------------------------------ + +Serial Connection Configuration +------------------------------- + +1. GRROSE board needs to be connected to PC terminal, using USB to Serial Chip. +2. Connect TX of USB to serial chip to RX of SCIX(0,1,2,5,6) +3. Connect RX of USB to serial chip to TX of SCIX(0,1,2,5,6) +4. Connect GND to GND pin. +5. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N GRROSE board has 2 LED's, 1 Power LED(LED3) and 2 User LED's(LED1, +LED2),which are enabled through software. + +If enabled the LED is simply turned on when the board boots successfully, and is +blinking on panic / assertion failed. + +Networking +========== + +Ethernet Connections +-------------------- + +---------- --------- +RX65N +GRROSE Ethernet +Pin Function +---------- --------- +PA4 ET0_MDC +PA3 ET0_MDIO +PB2 REF50CK0 +PB7 RMII0_CRS_DV +PB1 RMII0_RXD0 +PB0 RMII0_RXD1 +PB3 RMII0_RX_ER +PB5 RMII0_ETXD0 +PB6 RMII0_ETXD1 +PB4 RMII0_TXD_EN +PA5 ET0_LINKSTA +PA6_ET_RST ETHER reset +---------- ----------- + +NuttX Configurations +==================== + +The following configurations, need to be enabled for network. Review Comment: ```suggestion The following configurations need to be enabled for network. ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial +console). Only SCI8 port can be tested which is connected to USB Serial port. + +Serial ports SCI1, SCI2, SCI9-SCI12, cannot be tested because they are multiplexed to other Rx65N controller interfaces. + +Following SCI ports are configured w.r.t RX65N pin configuration + +SCI1 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PF2 RXD1 + PF1 TXD1 +------------ + +SCI2 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + P52 RXD2 + P50 TXD2 +------------ + +SCI8 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PJ1 RXD8 + PJ2 TXD8 +------------ + +Serial Connection Configuration +------------------------------- + +1. RSK2MB board needs to be connected to PC, using USB cable(One end of which is connected to PC, other end connected to Review Comment: ```suggestion 1. RSK2MB board needs to be connected to PC, using USB cable (one end of which is connected to PC, other end connected to ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial +console). Only SCI8 port can be tested which is connected to USB Serial port. + +Serial ports SCI1, SCI2, SCI9-SCI12, cannot be tested because they are multiplexed to other Rx65N controller interfaces. + +Following SCI ports are configured w.r.t RX65N pin configuration + +SCI1 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PF2 RXD1 + PF1 TXD1 +------------ + +SCI2 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + P52 RXD2 + P50 TXD2 +------------ + +SCI8 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PJ1 RXD8 + PJ2 TXD8 +------------ + +Serial Connection Configuration +------------------------------- + +1. RSK2MB board needs to be connected to PC, using USB cable(One end of which is connected to PC, other end connected to + USB serial port on H/W board). + +2. RSK USB Serial Driver needs to be downloaded on PC side. + +3. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N RSK2MB board has 2 Power LED's(PowerLED5 LED_G, PowerLED3 LED_G) and 4 user LED's (LED_G, LED_O, LED_R, +LED_R). + +If enabled 4 User LED's are simply turned on when the board boots successfully, and is blinking on panic / assertion +failed. + +Networking +========== + +Ethernet Connections +-------------------- + +------ ----------- +RX65N +RSK2MB Ethernet +Pin Function +------ ----------- +PC4 ET0_TX_CLK +P76 ET0_RX_CLK +P80 ET0_TX_EN +PC6 ET0_ETXD3 +PC5 ET0_ETXD2 +P82 ET0_ETXD1 +P81 ET0_ETXD0 +PC3 ET0_TX_ER +PC2 ET0_RX_DV +PC0 ET0_ERXD3 +PC1 ET0_ERXD2 +P74 ET0_ERXD1 +P75 ET0_ERXD0 +P77 ET0_RX_ER +P83 ET0_CRS +PC7 ET0_COL +P72 ET0_MDC +P71 ET0_MDIO +P54 ET0_LINKSTA +------ ----------- + +USB Device +----------- + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +NuttX Configuration Options +--------------------------- + +The following configurations, need to be enabled for network. + +``CONFIG_RX65N_EMAC=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0_PHYSR=30``: Address of PHY status register +``CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18``: Needed for PHY CHIP +``CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10FD=0x14``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c``: " " " " " " +``CONFIG_RX65N_EMAC0_RMII=y`` +``CONFIG_RX65N_EMAC0_PHYADDR=0``: PHY is at address 1 +``CONFIG_SCHED_WORKQUEUE=y``: Work queue support is needed +``CONFIG_SCHED_HPWORK=y``: High Priority Work queue support +``CONFIG_SCHED_LPWORK=y``: Low Priority Work queue support + +Using the network with NSH +-------------------------- + +The IP address is configured using DHCP, using the below mentioned configurations : + +* ``CONFIG_NETUTILS_DHCPC=y`` +* ``CONFIG_NETUTILS_DHCPD=y`` +* ``CONFIG_NSH_DHCPC=y`` +* ``CONFIG_NETINIT_DHCPC=y`` + +.. code:: console + + nsh> ifconfig + eth0 HWaddr 00:e0:de:ad:be:ef at UP + IPaddr:10.75.24.53 DRaddr:10.75.24.1 Mask:255.255.254.0 + +You can use ping to test for connectivity to the host (Careful, Window firewalls usually block ping-related ICMP +traffic). On the target side, you can: + +.. code:: console + + nsh> ping 10.75.24.250 + PING 10.75.24.250 56 bytes of data + 56 bytes from 10.75.24.250: icmp_seq=1 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=2 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=3 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=4 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=5 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=6 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=7 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=8 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=9 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=10 time=0 ms + 10 packets transmitted, 10 received, 0% packet loss, time 10100 ms + +On the host side, you should also be able to ping the RX65N-RSK2MB: + +.. code:: console + + $ ping 10.75.24.53 + +Configure UDP blaster application as mentioned below: + +* ``CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801`` (10.75.24.1) ------> Gateway IP +* ``CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00`` (255.255.254.0) --------> Netmask +* ``CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b`` (10.75.24.155) ---------> Target IP + +RSPI +---- + +For RX65N RSK2MB board, Following pin is configured for all channels in JA3. +Channel0: Pin number 7 and 8 in JA3 is used for MOSIA and MISOA respectively +Channel1: Pin number 35 and 36 in JA3 is used for MOSIB and MISOB respectively +Channel2: Pin number 18 and 19 in JA3 is used for MOSIC and MISOC respectively +and for enabling these pin need to select DSW-SEL0 by making off SW4-4 + +USB Host Jumpers +================ + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 1 & Pin 2 +J16 Short Pin 2 & Pin 3 + +USB Device Jumpers +================== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +RTC +=== + +NuttX Configurations +-------------------- + +The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled. + +RTC Testing +----------- + +The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed as part of RTC testing. + +The following configurations are to be enabled as part of testing RTC examples. + +* ``CONFIG_EXAMPLES_ALARM`` +* ``CONFIG_EXAMPLES_PERIODIC`` +* ``CONFIG_EXAMPLES_CARRY`` + +USB Device Configurations +------------------------- + +The following configurations need to be enabled for USB Device + +* ``CONFIG_USBDEV`` +* ``CONFIG_CDCACM`` +* ``CONFIG_STDIO_BUFFER_SIZE=64`` +* ``CONFIG_STDIO_LINEBUFFER`` + +USB Device Testing +------------------ + +The following testing is executed as part of USB Device testing on RX65N target for GRROSE board + +.. code:: console + + $ echo "This is a test for USB Device" > /dev/ttyACM0 + $ xd 0 0x20000 > /dev/ttyACM0 + +The output of the commands mentioned above should be seen on the USB Device COM port on teraterm + +RSPI Configurations +------------------- + +The following configurations need to be enabled for RSPI + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +RSPI Testing +------------ + +The following testing is executed as part of RSPI testing on RX65N target for RSK2MB board + +On RSK2MB board, all three channels 0, 1 and 2 has been brought out and tested. + +Following command can be used for testing RSPI communication to slave device. + +.. code:: console + + $ spi exch -b 0 -x 4 aabbccdd + +where b is bus number and x is Number of word to exchange. + +RIIC Configurations +------------------- + +The following configurations need to be enabled for RIIC. + +* ``CONFIG_SYSTEM_I2CTOOL=y`` + +RIIC Testing +------------ + +The following testing is executed as part of RIIC testing on RX65N target for RSK2MB board + +On RSK2MB board only channel 0 can be tested. + +Following command can be used for testing RIIC communication with slave device. + +.. code:: console + + $ i2c set -b 0 -a 53 -r 0 10 + +where b is bus number, a is the slave address, r is the register address and 10 is the value to be written. + +DTC Configurations +------------------ + +The following configurations need to be enabled for DTC. + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +DTC Testing +----------- + +DTC has been tested using RSPI driver. + +USB Host Configurations +----------------------- + +The following configurations need to be enabled for USB Host Mode driver to +support USB HID Keyboard class and MSC Class. + +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Driver Testing +------------------------ + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +USB Host Hub Configurations +--------------------------- + +The following configurations need to be enabled for USB Host Mode driver to support USB HID Keyboard class and MSC +Class. + +* ``CONFIG_RX65N_USBHOST=y`` +* ``CONFIG_USBHOST_HUB=y`` +* ``CONFIG_USBHOST_ASYNCH=y`` +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Hub Driver Testing +--------------------------- + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +Debugging +========= + +1. NuttX needs to be compiled in Cygwin environment on Windows. + +The following Configuration needs to be set, in order to do source level debugging. + +``CONFIG_DEBUG_SYMBOLS=y`` (Set this option, using menuconfig only, DO NOT Enable this as default configuration). + +2. Download & Install Renesas e2studio IDE +3. Load the project(NuttX built on Cygwin) as Makefile project with existing code +4. Right click on the project, and select Debug Configurations +5. The binary(NuttX) needs to be loaded using E1/E2 Emulator +6. Select the Device name as R5F565NE and Emulator as E1/E2(whichever is being used) +7. Select Connection type as JTAG +8. Load and run the binary + +Flashing NuttX +============== + +Alternatively, NuttX binary can be flashed using Renesas flash programmer tool without using e2 studio/Cygwin + +Below are the steps mentioned to flash NuttX binary using Renesas flash programmer tool(RFP). Review Comment: ```suggestion Below are the steps mentioned to flash NuttX binary using Renesas flash programmer tool (RFP). ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial +console). Only SCI8 port can be tested which is connected to USB Serial port. + +Serial ports SCI1, SCI2, SCI9-SCI12, cannot be tested because they are multiplexed to other Rx65N controller interfaces. + +Following SCI ports are configured w.r.t RX65N pin configuration + +SCI1 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PF2 RXD1 + PF1 TXD1 +------------ + +SCI2 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + P52 RXD2 + P50 TXD2 +------------ + +SCI8 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PJ1 RXD8 + PJ2 TXD8 +------------ + +Serial Connection Configuration +------------------------------- + +1. RSK2MB board needs to be connected to PC, using USB cable(One end of which is connected to PC, other end connected to + USB serial port on H/W board). + +2. RSK USB Serial Driver needs to be downloaded on PC side. + +3. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N RSK2MB board has 2 Power LED's(PowerLED5 LED_G, PowerLED3 LED_G) and 4 user LED's (LED_G, LED_O, LED_R, +LED_R). + +If enabled 4 User LED's are simply turned on when the board boots successfully, and is blinking on panic / assertion +failed. + +Networking +========== + +Ethernet Connections +-------------------- + +------ ----------- +RX65N +RSK2MB Ethernet +Pin Function +------ ----------- +PC4 ET0_TX_CLK +P76 ET0_RX_CLK +P80 ET0_TX_EN +PC6 ET0_ETXD3 +PC5 ET0_ETXD2 +P82 ET0_ETXD1 +P81 ET0_ETXD0 +PC3 ET0_TX_ER +PC2 ET0_RX_DV +PC0 ET0_ERXD3 +PC1 ET0_ERXD2 +P74 ET0_ERXD1 +P75 ET0_ERXD0 +P77 ET0_RX_ER +P83 ET0_CRS +PC7 ET0_COL +P72 ET0_MDC +P71 ET0_MDIO +P54 ET0_LINKSTA +------ ----------- + +USB Device +----------- + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +NuttX Configuration Options +--------------------------- + +The following configurations, need to be enabled for network. + +``CONFIG_RX65N_EMAC=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0_PHYSR=30``: Address of PHY status register +``CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18``: Needed for PHY CHIP +``CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10FD=0x14``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c``: " " " " " " +``CONFIG_RX65N_EMAC0_RMII=y`` +``CONFIG_RX65N_EMAC0_PHYADDR=0``: PHY is at address 1 +``CONFIG_SCHED_WORKQUEUE=y``: Work queue support is needed +``CONFIG_SCHED_HPWORK=y``: High Priority Work queue support +``CONFIG_SCHED_LPWORK=y``: Low Priority Work queue support + +Using the network with NSH +-------------------------- + +The IP address is configured using DHCP, using the below mentioned configurations : + +* ``CONFIG_NETUTILS_DHCPC=y`` +* ``CONFIG_NETUTILS_DHCPD=y`` +* ``CONFIG_NSH_DHCPC=y`` +* ``CONFIG_NETINIT_DHCPC=y`` + +.. code:: console + + nsh> ifconfig + eth0 HWaddr 00:e0:de:ad:be:ef at UP + IPaddr:10.75.24.53 DRaddr:10.75.24.1 Mask:255.255.254.0 + +You can use ping to test for connectivity to the host (Careful, Window firewalls usually block ping-related ICMP +traffic). On the target side, you can: + +.. code:: console + + nsh> ping 10.75.24.250 + PING 10.75.24.250 56 bytes of data + 56 bytes from 10.75.24.250: icmp_seq=1 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=2 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=3 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=4 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=5 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=6 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=7 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=8 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=9 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=10 time=0 ms + 10 packets transmitted, 10 received, 0% packet loss, time 10100 ms + +On the host side, you should also be able to ping the RX65N-RSK2MB: + +.. code:: console + + $ ping 10.75.24.53 + +Configure UDP blaster application as mentioned below: + +* ``CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801`` (10.75.24.1) ------> Gateway IP +* ``CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00`` (255.255.254.0) --------> Netmask +* ``CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b`` (10.75.24.155) ---------> Target IP + +RSPI +---- + +For RX65N RSK2MB board, Following pin is configured for all channels in JA3. +Channel0: Pin number 7 and 8 in JA3 is used for MOSIA and MISOA respectively +Channel1: Pin number 35 and 36 in JA3 is used for MOSIB and MISOB respectively +Channel2: Pin number 18 and 19 in JA3 is used for MOSIC and MISOC respectively +and for enabling these pin need to select DSW-SEL0 by making off SW4-4 + +USB Host Jumpers +================ + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 1 & Pin 2 +J16 Short Pin 2 & Pin 3 + +USB Device Jumpers +================== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +RTC +=== + +NuttX Configurations +-------------------- + +The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled. + +RTC Testing +----------- + +The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed as part of RTC testing. + +The following configurations are to be enabled as part of testing RTC examples. + +* ``CONFIG_EXAMPLES_ALARM`` +* ``CONFIG_EXAMPLES_PERIODIC`` +* ``CONFIG_EXAMPLES_CARRY`` + +USB Device Configurations +------------------------- + +The following configurations need to be enabled for USB Device + +* ``CONFIG_USBDEV`` +* ``CONFIG_CDCACM`` +* ``CONFIG_STDIO_BUFFER_SIZE=64`` +* ``CONFIG_STDIO_LINEBUFFER`` + +USB Device Testing +------------------ + +The following testing is executed as part of USB Device testing on RX65N target for GRROSE board + +.. code:: console + + $ echo "This is a test for USB Device" > /dev/ttyACM0 + $ xd 0 0x20000 > /dev/ttyACM0 + +The output of the commands mentioned above should be seen on the USB Device COM port on teraterm + +RSPI Configurations +------------------- + +The following configurations need to be enabled for RSPI + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +RSPI Testing +------------ + +The following testing is executed as part of RSPI testing on RX65N target for RSK2MB board + +On RSK2MB board, all three channels 0, 1 and 2 has been brought out and tested. + +Following command can be used for testing RSPI communication to slave device. + +.. code:: console + + $ spi exch -b 0 -x 4 aabbccdd + +where b is bus number and x is Number of word to exchange. + +RIIC Configurations +------------------- + +The following configurations need to be enabled for RIIC. + +* ``CONFIG_SYSTEM_I2CTOOL=y`` + +RIIC Testing +------------ + +The following testing is executed as part of RIIC testing on RX65N target for RSK2MB board + +On RSK2MB board only channel 0 can be tested. + +Following command can be used for testing RIIC communication with slave device. + +.. code:: console + + $ i2c set -b 0 -a 53 -r 0 10 + +where b is bus number, a is the slave address, r is the register address and 10 is the value to be written. + +DTC Configurations +------------------ + +The following configurations need to be enabled for DTC. + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +DTC Testing +----------- + +DTC has been tested using RSPI driver. + +USB Host Configurations +----------------------- + +The following configurations need to be enabled for USB Host Mode driver to +support USB HID Keyboard class and MSC Class. + +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Driver Testing +------------------------ + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +USB Host Hub Configurations +--------------------------- + +The following configurations need to be enabled for USB Host Mode driver to support USB HID Keyboard class and MSC +Class. + +* ``CONFIG_RX65N_USBHOST=y`` +* ``CONFIG_USBHOST_HUB=y`` +* ``CONFIG_USBHOST_ASYNCH=y`` +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Hub Driver Testing +--------------------------- + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +Debugging +========= + +1. NuttX needs to be compiled in Cygwin environment on Windows. + +The following Configuration needs to be set, in order to do source level debugging. + +``CONFIG_DEBUG_SYMBOLS=y`` (Set this option, using menuconfig only, DO NOT Enable this as default configuration). + +2. Download & Install Renesas e2studio IDE +3. Load the project(NuttX built on Cygwin) as Makefile project with existing code +4. Right click on the project, and select Debug Configurations +5. The binary(NuttX) needs to be loaded using E1/E2 Emulator Review Comment: ```suggestion 5. The binary (NuttX) needs to be loaded using E1/E2 Emulator ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial +console). Only SCI8 port can be tested which is connected to USB Serial port. + +Serial ports SCI1, SCI2, SCI9-SCI12, cannot be tested because they are multiplexed to other Rx65N controller interfaces. + +Following SCI ports are configured w.r.t RX65N pin configuration + +SCI1 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PF2 RXD1 + PF1 TXD1 +------------ + +SCI2 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + P52 RXD2 + P50 TXD2 +------------ + +SCI8 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PJ1 RXD8 + PJ2 TXD8 +------------ + +Serial Connection Configuration +------------------------------- + +1. RSK2MB board needs to be connected to PC, using USB cable(One end of which is connected to PC, other end connected to + USB serial port on H/W board). + +2. RSK USB Serial Driver needs to be downloaded on PC side. + +3. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N RSK2MB board has 2 Power LED's(PowerLED5 LED_G, PowerLED3 LED_G) and 4 user LED's (LED_G, LED_O, LED_R, +LED_R). + +If enabled 4 User LED's are simply turned on when the board boots successfully, and is blinking on panic / assertion +failed. + +Networking +========== + +Ethernet Connections +-------------------- + +------ ----------- +RX65N +RSK2MB Ethernet +Pin Function +------ ----------- +PC4 ET0_TX_CLK +P76 ET0_RX_CLK +P80 ET0_TX_EN +PC6 ET0_ETXD3 +PC5 ET0_ETXD2 +P82 ET0_ETXD1 +P81 ET0_ETXD0 +PC3 ET0_TX_ER +PC2 ET0_RX_DV +PC0 ET0_ERXD3 +PC1 ET0_ERXD2 +P74 ET0_ERXD1 +P75 ET0_ERXD0 +P77 ET0_RX_ER +P83 ET0_CRS +PC7 ET0_COL +P72 ET0_MDC +P71 ET0_MDIO +P54 ET0_LINKSTA +------ ----------- + +USB Device +----------- + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +NuttX Configuration Options +--------------------------- + +The following configurations, need to be enabled for network. + +``CONFIG_RX65N_EMAC=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0_PHYSR=30``: Address of PHY status register +``CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18``: Needed for PHY CHIP +``CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10FD=0x14``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c``: " " " " " " +``CONFIG_RX65N_EMAC0_RMII=y`` +``CONFIG_RX65N_EMAC0_PHYADDR=0``: PHY is at address 1 +``CONFIG_SCHED_WORKQUEUE=y``: Work queue support is needed +``CONFIG_SCHED_HPWORK=y``: High Priority Work queue support +``CONFIG_SCHED_LPWORK=y``: Low Priority Work queue support + +Using the network with NSH +-------------------------- + +The IP address is configured using DHCP, using the below mentioned configurations : + +* ``CONFIG_NETUTILS_DHCPC=y`` +* ``CONFIG_NETUTILS_DHCPD=y`` +* ``CONFIG_NSH_DHCPC=y`` +* ``CONFIG_NETINIT_DHCPC=y`` + +.. code:: console + + nsh> ifconfig + eth0 HWaddr 00:e0:de:ad:be:ef at UP + IPaddr:10.75.24.53 DRaddr:10.75.24.1 Mask:255.255.254.0 + +You can use ping to test for connectivity to the host (Careful, Window firewalls usually block ping-related ICMP +traffic). On the target side, you can: + +.. code:: console + + nsh> ping 10.75.24.250 + PING 10.75.24.250 56 bytes of data + 56 bytes from 10.75.24.250: icmp_seq=1 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=2 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=3 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=4 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=5 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=6 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=7 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=8 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=9 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=10 time=0 ms + 10 packets transmitted, 10 received, 0% packet loss, time 10100 ms + +On the host side, you should also be able to ping the RX65N-RSK2MB: + +.. code:: console + + $ ping 10.75.24.53 + +Configure UDP blaster application as mentioned below: + +* ``CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801`` (10.75.24.1) ------> Gateway IP +* ``CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00`` (255.255.254.0) --------> Netmask +* ``CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b`` (10.75.24.155) ---------> Target IP + +RSPI +---- + +For RX65N RSK2MB board, Following pin is configured for all channels in JA3. +Channel0: Pin number 7 and 8 in JA3 is used for MOSIA and MISOA respectively +Channel1: Pin number 35 and 36 in JA3 is used for MOSIB and MISOB respectively +Channel2: Pin number 18 and 19 in JA3 is used for MOSIC and MISOC respectively +and for enabling these pin need to select DSW-SEL0 by making off SW4-4 + +USB Host Jumpers +================ + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 1 & Pin 2 +J16 Short Pin 2 & Pin 3 + +USB Device Jumpers +================== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +RTC +=== + +NuttX Configurations +-------------------- + +The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled. + +RTC Testing +----------- + +The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed as part of RTC testing. + +The following configurations are to be enabled as part of testing RTC examples. + +* ``CONFIG_EXAMPLES_ALARM`` +* ``CONFIG_EXAMPLES_PERIODIC`` +* ``CONFIG_EXAMPLES_CARRY`` + +USB Device Configurations +------------------------- + +The following configurations need to be enabled for USB Device + +* ``CONFIG_USBDEV`` +* ``CONFIG_CDCACM`` +* ``CONFIG_STDIO_BUFFER_SIZE=64`` +* ``CONFIG_STDIO_LINEBUFFER`` + +USB Device Testing +------------------ + +The following testing is executed as part of USB Device testing on RX65N target for GRROSE board + +.. code:: console + + $ echo "This is a test for USB Device" > /dev/ttyACM0 + $ xd 0 0x20000 > /dev/ttyACM0 + +The output of the commands mentioned above should be seen on the USB Device COM port on teraterm + +RSPI Configurations +------------------- + +The following configurations need to be enabled for RSPI + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +RSPI Testing +------------ + +The following testing is executed as part of RSPI testing on RX65N target for RSK2MB board + +On RSK2MB board, all three channels 0, 1 and 2 has been brought out and tested. + +Following command can be used for testing RSPI communication to slave device. + +.. code:: console + + $ spi exch -b 0 -x 4 aabbccdd + +where b is bus number and x is Number of word to exchange. + +RIIC Configurations +------------------- + +The following configurations need to be enabled for RIIC. + +* ``CONFIG_SYSTEM_I2CTOOL=y`` + +RIIC Testing +------------ + +The following testing is executed as part of RIIC testing on RX65N target for RSK2MB board + +On RSK2MB board only channel 0 can be tested. + +Following command can be used for testing RIIC communication with slave device. + +.. code:: console + + $ i2c set -b 0 -a 53 -r 0 10 + +where b is bus number, a is the slave address, r is the register address and 10 is the value to be written. + +DTC Configurations +------------------ + +The following configurations need to be enabled for DTC. + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +DTC Testing +----------- + +DTC has been tested using RSPI driver. + +USB Host Configurations +----------------------- + +The following configurations need to be enabled for USB Host Mode driver to +support USB HID Keyboard class and MSC Class. + +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Driver Testing +------------------------ + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +USB Host Hub Configurations +--------------------------- + +The following configurations need to be enabled for USB Host Mode driver to support USB HID Keyboard class and MSC +Class. + +* ``CONFIG_RX65N_USBHOST=y`` +* ``CONFIG_USBHOST_HUB=y`` +* ``CONFIG_USBHOST_ASYNCH=y`` +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Hub Driver Testing +--------------------------- + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +Debugging +========= + +1. NuttX needs to be compiled in Cygwin environment on Windows. + +The following Configuration needs to be set, in order to do source level debugging. + +``CONFIG_DEBUG_SYMBOLS=y`` (Set this option, using menuconfig only, DO NOT Enable this as default configuration). + +2. Download & Install Renesas e2studio IDE +3. Load the project(NuttX built on Cygwin) as Makefile project with existing code Review Comment: ```suggestion 3. Load the project (NuttX built on Cygwin) as Makefile project with existing code ``` ########## Documentation/platforms/renesas/rx65n/boards/rx65n-rsk2mb/index.rst: ########## @@ -2,8 +2,449 @@ RX65N RSK2MB ============ -.. include:: README.txt - :literal: +.. tags:: arch:renesas -.. include:: ROMFS.txt - :literal: +This README file discusses the port of NuttX to the RX65N RSK2MB board. This board features the RX65N (R5F565NEHDFC +176pin) + +Board Features +============== + +- Mounted devices: RX65N (R5F565NEDDFC: No Encrypt Function, Code Flash 2MB, Pin Count 176-pin), or RX65N (R5F565NEHDFC: + Supported Encrypt Function, Code Flash 2MB, Pin Count 176-pin) +- Mounts TFT Display. Graphic LCD controller can be evaluated +- 1 channel Ethernet can be evaluated +- RX65N builds in Trusted Secure IP. AES encryption function and robust key management can be evaluated (*) +- Mounts SD slot. If an optional Wireless LAN expansion board package for RSK (RTK0ZZZZZZP00000BR#WS) is used, Wireless + LAN can evaluated +- 1 channel USB Function and 1 channel USB Host can be evaluated +- In addition, CAN, RSPI, QSPI, etc. can be evaluated + +See the RX65N RSK2MB website for further information about this board: +https://www.renesas.com/br/en/products/software-tools/boards-and-kits/starter-kits/renesas-starter-kitplus-for-rx65n-2mb.html + +Serial Console +============== + +RX65N RSK2MB supports 12 serial ports (SCI0 - SCI12), however only 1 port can be tested(SCI8, which is the serial +console). Only SCI8 port can be tested which is connected to USB Serial port. + +Serial ports SCI1, SCI2, SCI9-SCI12, cannot be tested because they are multiplexed to other Rx65N controller interfaces. + +Following SCI ports are configured w.r.t RX65N pin configuration + +SCI1 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PF2 RXD1 + PF1 TXD1 +------------ + +SCI2 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + P52 RXD2 + P50 TXD2 +------------ + +SCI8 Pin Configuration: + +------------ +RX65N RSK2MB + Function +------------ + PJ1 RXD8 + PJ2 TXD8 +------------ + +Serial Connection Configuration +------------------------------- + +1. RSK2MB board needs to be connected to PC, using USB cable(One end of which is connected to PC, other end connected to + USB serial port on H/W board). + +2. RSK USB Serial Driver needs to be downloaded on PC side. + +3. Configure Teraterm to 115200 baud. + +LEDs +==== + +The RX65N RSK2MB board has 2 Power LED's(PowerLED5 LED_G, PowerLED3 LED_G) and 4 user LED's (LED_G, LED_O, LED_R, +LED_R). + +If enabled 4 User LED's are simply turned on when the board boots successfully, and is blinking on panic / assertion +failed. + +Networking +========== + +Ethernet Connections +-------------------- + +------ ----------- +RX65N +RSK2MB Ethernet +Pin Function +------ ----------- +PC4 ET0_TX_CLK +P76 ET0_RX_CLK +P80 ET0_TX_EN +PC6 ET0_ETXD3 +PC5 ET0_ETXD2 +P82 ET0_ETXD1 +P81 ET0_ETXD0 +PC3 ET0_TX_ER +PC2 ET0_RX_DV +PC0 ET0_ERXD3 +PC1 ET0_ERXD2 +P74 ET0_ERXD1 +P75 ET0_ERXD0 +P77 ET0_RX_ER +P83 ET0_CRS +PC7 ET0_COL +P72 ET0_MDC +P71 ET0_MDIO +P54 ET0_LINKSTA +------ ----------- + +USB Device +----------- + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +NuttX Configuration Options +--------------------------- + +The following configurations, need to be enabled for network. + +``CONFIG_RX65N_EMAC=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0=y``: Enable the EMAC Peripheral for RX65N +``CONFIG_RX65N_EMAC0_PHYSR=30``: Address of PHY status register +``CONFIG_RX65N_EMAC0_PHYSR_100FD=0x18``: Needed for PHY CHIP +``CONFIG_RX65N_EMAC0_PHYSR_100HD=0x08``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10FD=0x14``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_10HD=0x04``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTCONFIG=y``: " " " " " " +``CONFIG_RX65N_EMAC0_PHYSR_ALTMODE=0x1c``: " " " " " " +``CONFIG_RX65N_EMAC0_RMII=y`` +``CONFIG_RX65N_EMAC0_PHYADDR=0``: PHY is at address 1 +``CONFIG_SCHED_WORKQUEUE=y``: Work queue support is needed +``CONFIG_SCHED_HPWORK=y``: High Priority Work queue support +``CONFIG_SCHED_LPWORK=y``: Low Priority Work queue support + +Using the network with NSH +-------------------------- + +The IP address is configured using DHCP, using the below mentioned configurations : + +* ``CONFIG_NETUTILS_DHCPC=y`` +* ``CONFIG_NETUTILS_DHCPD=y`` +* ``CONFIG_NSH_DHCPC=y`` +* ``CONFIG_NETINIT_DHCPC=y`` + +.. code:: console + + nsh> ifconfig + eth0 HWaddr 00:e0:de:ad:be:ef at UP + IPaddr:10.75.24.53 DRaddr:10.75.24.1 Mask:255.255.254.0 + +You can use ping to test for connectivity to the host (Careful, Window firewalls usually block ping-related ICMP +traffic). On the target side, you can: + +.. code:: console + + nsh> ping 10.75.24.250 + PING 10.75.24.250 56 bytes of data + 56 bytes from 10.75.24.250: icmp_seq=1 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=2 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=3 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=4 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=5 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=6 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=7 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=8 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=9 time=0 ms + 56 bytes from 10.75.24.250: icmp_seq=10 time=0 ms + 10 packets transmitted, 10 received, 0% packet loss, time 10100 ms + +On the host side, you should also be able to ping the RX65N-RSK2MB: + +.. code:: console + + $ ping 10.75.24.53 + +Configure UDP blaster application as mentioned below: + +* ``CONFIG_EXAMPLES_UDPBLASTER_HOSTIP=0x0a4b1801`` (10.75.24.1) ------> Gateway IP +* ``CONFIG_EXAMPLES_UDPBLASTER_NETMASK=0xfffffe00`` (255.255.254.0) --------> Netmask +* ``CONFIG_EXAMPLES_UDPBLASTER_TARGETIP=0x0a4b189b`` (10.75.24.155) ---------> Target IP + +RSPI +---- + +For RX65N RSK2MB board, Following pin is configured for all channels in JA3. +Channel0: Pin number 7 and 8 in JA3 is used for MOSIA and MISOA respectively +Channel1: Pin number 35 and 36 in JA3 is used for MOSIB and MISOB respectively +Channel2: Pin number 18 and 19 in JA3 is used for MOSIC and MISOC respectively +and for enabling these pin need to select DSW-SEL0 by making off SW4-4 + +USB Host Jumpers +================ + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 1 & Pin 2 +J16 Short Pin 2 & Pin 3 + +USB Device Jumpers +================== + +For the RX65N RSK2MB board, to be used as USB Device, the following Jumper settings need to be done + +J7 Short Pin 2 & Pin 3 +J16 Short Pin 1 & Pin 2 + +RTC +=== + +NuttX Configurations +-------------------- + +The configurations listed in Renesas_RX65N_NuttX_RTC_Design.doc need to be enabled. + +RTC Testing +----------- + +The test cases mentioned in Renesas_RX65N_RTC_Test_Cases.xls are to be executed as part of RTC testing. + +The following configurations are to be enabled as part of testing RTC examples. + +* ``CONFIG_EXAMPLES_ALARM`` +* ``CONFIG_EXAMPLES_PERIODIC`` +* ``CONFIG_EXAMPLES_CARRY`` + +USB Device Configurations +------------------------- + +The following configurations need to be enabled for USB Device + +* ``CONFIG_USBDEV`` +* ``CONFIG_CDCACM`` +* ``CONFIG_STDIO_BUFFER_SIZE=64`` +* ``CONFIG_STDIO_LINEBUFFER`` + +USB Device Testing +------------------ + +The following testing is executed as part of USB Device testing on RX65N target for GRROSE board + +.. code:: console + + $ echo "This is a test for USB Device" > /dev/ttyACM0 + $ xd 0 0x20000 > /dev/ttyACM0 + +The output of the commands mentioned above should be seen on the USB Device COM port on teraterm + +RSPI Configurations +------------------- + +The following configurations need to be enabled for RSPI + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +RSPI Testing +------------ + +The following testing is executed as part of RSPI testing on RX65N target for RSK2MB board + +On RSK2MB board, all three channels 0, 1 and 2 has been brought out and tested. + +Following command can be used for testing RSPI communication to slave device. + +.. code:: console + + $ spi exch -b 0 -x 4 aabbccdd + +where b is bus number and x is Number of word to exchange. + +RIIC Configurations +------------------- + +The following configurations need to be enabled for RIIC. + +* ``CONFIG_SYSTEM_I2CTOOL=y`` + +RIIC Testing +------------ + +The following testing is executed as part of RIIC testing on RX65N target for RSK2MB board + +On RSK2MB board only channel 0 can be tested. + +Following command can be used for testing RIIC communication with slave device. + +.. code:: console + + $ i2c set -b 0 -a 53 -r 0 10 + +where b is bus number, a is the slave address, r is the register address and 10 is the value to be written. + +DTC Configurations +------------------ + +The following configurations need to be enabled for DTC. + +* ``CONFIG_SYSTEM_SPITOOL=y`` + +DTC Testing +----------- + +DTC has been tested using RSPI driver. + +USB Host Configurations +----------------------- + +The following configurations need to be enabled for USB Host Mode driver to +support USB HID Keyboard class and MSC Class. + +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Driver Testing +------------------------ + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +USB Host Hub Configurations +--------------------------- + +The following configurations need to be enabled for USB Host Mode driver to support USB HID Keyboard class and MSC +Class. + +* ``CONFIG_RX65N_USBHOST=y`` +* ``CONFIG_USBHOST_HUB=y`` +* ``CONFIG_USBHOST_ASYNCH=y`` +* ``CONFIG_USBHOST=y`` +* ``CONFIG_USBHOST_HIDKBD=y`` +* ``CONFIG_FS_FAT=y`` +* ``CONFIG_EXAMPLES_HIDKBD=y`` + +USB Host Hub Driver Testing +--------------------------- + +The Following Class Drivers were tested as mentioned below : + +- USB HID Keyboard Class + +On the NuttX Console "hidkbd" application was executed + +.. code:: console + + nsh> hidkbd + +The characters typed from the keyboard were executed correctly. + +- USB MSC Class + +The MSC device is enumerated as ``sda`` in ``/dev`` directory. + +The block device is mounted using the command as mentioned below: + +.. code:: console + + $ mount -t vfat /dev/sda /mnt + +The MSC device is mounted in ``/dev`` directory + +The copy command is executed to test the Read/Write functionality + +.. code:: console + + $ cp /mnt/<file.txt> /mnt/file_copy.txt + +Debugging +========= + +1. NuttX needs to be compiled in Cygwin environment on Windows. + +The following Configuration needs to be set, in order to do source level debugging. + +``CONFIG_DEBUG_SYMBOLS=y`` (Set this option, using menuconfig only, DO NOT Enable this as default configuration). + +2. Download & Install Renesas e2studio IDE +3. Load the project(NuttX built on Cygwin) as Makefile project with existing code +4. Right click on the project, and select Debug Configurations +5. The binary(NuttX) needs to be loaded using E1/E2 Emulator +6. Select the Device name as R5F565NE and Emulator as E1/E2(whichever is being used) Review Comment: ```suggestion 6. Select the Device name as R5F565NE and Emulator as E1/E2 (whichever is being used) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org