xref: /btstack/port/renesas-tb-s1ja-cc256x/README.md (revision a0a4507b35ea396d076a62a67efb1a5a800c5ff9)
1# BTstack port for Renesas Target Board TB-S1JA with CC256x
2
3This port uses the Renesas TB-S1JA with TI's CC256XEM ST Adapter Kit that allows to plug in a CC256xB or CC256xC Bluetooth module.
4Renesas e2 Studio (Eclise-based) was used with the SSP HAL and without an RTOS.
5For easy debugging, Ozone project files are generated as well.
6
7## Hardware
8
9Renesas Target Board TB-S1JA:
10- [TB-S1JA Target Board Kit](https://www.renesas.com/eu/en/products/synergy/hardware/kits/tb-s1ja.html)
11
12- CC2564B Bluetooth Controller:
13  1. The best option is to get it as a BoostPack
14     - Info: BOOST-CC2564MODA: http://www.ti.com/tool/BOOST-CC2564MODA
15  2. Alternatively, get the evaluation module together with the EM Wireless Booster pack and a 32.768 kHz oscillator
16     - EM Wireless Booster Pack:
17       - [Info](http://www.ti.com/tool/BOOST-CCEMADAPTER)
18       - [User Guide](http://www.ti.com/lit/pdf/swru338)
19    - CC256x Bluetooth module:
20       - [CC2564B Dual-mode Bluetooth® Controller Evaluation Module](https://store.ti.com/cc2564modnem.aspx)
21       - [CC2564C Dual-mode Bluetooth® Controller Evaluation Module](https://store.ti.com/CC256XCQFN-EM-CC2564C-Dual-Mode-Bluetooth-Controller-Evaluation-Module-P51277.aspx)
22       - The module with the older CC2564B is around USD 20, while the one with the new CC2564C costs around USD 60
23
24The projects are configured for the CC2564C. When using the CC2564B, *bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c* should be used as cc256x_init_script. You can update this in the create_examples.py script.
25
26Connct the Target Board to the TI Boosterpack, see Booster Pack Pinout: http://www.ti.com/ww/en/launchpad/dl/boosterpack-pinout-v2.pdf
27
28
29J2 PIN | S1JA PORT | S1JA Signal | Boosterpack
30-------|-----------|-------------|------------
312      | P301      | RXD0        | 3  (LP1)
324      | P302      | TXD0        | 4  (LP1)
336      | P304      | CTS0        | 36 (LP2)
348      | P303      | RTS0        | 37 (LP2)
3510     | VCC       | VCC         |  1 (LP1)
3612     | VSS       | GND         | 20 (LP2)
3714     | P112      | nShutdown   | 19 (LP1)
38
39## Software
40
41Generate example projects
42
43    $ python create_examples.py
44
45This will generate an e2 Studio project for each example.
46
47
48## Build, Flash And Run The Examples in e2 Studio
49
50Open the e2 Studio project and press the 'Debug' button. Debug output is only available via SEGGER RTT. You can run SEGGER's JLinkRTTViewer or use Ozone as described below.
51
52
53## Run Example Project using Ozone
54
55After compiling the project with e2 Studio, the genereated .elf file can be used with Ozone. In Ozone, the debug output is readily available. A .jdebug file is provided in the project folder.
56
57
58## Debug output
59
60All debug output is send via SEGGER RTT.
61
62In src/btstack_config.h resp. in example/btstack_config.h of the generated projects, additional debug information can be enabled by uncommenting ENABLE_LOG_INFO.
63
64Also, the full packet log can be enabled in src/port.c The console output can then be converted into .pklg files for OS X PacketLogger or WireShark by running tool/create_packet_log.py
65
66
67## GATT Database
68In BTstack, the GATT Database is defined via the .gatt file in the example folder. The create_examples.py script converts the .gatt files into a corresponding .h for the project. After updating a .gatt file, the .h can be updated manually by running the provided update_gatt_db.sh or update_gatt_db.bat scripts.
69
70Note: In theory, this can be integrated into the e2 Studio/Eclipse project.
71
72
73## Notes
74- HCI UART is set to 2 mbps. Using 3 or 4 mbps causes hang during startup
75
76
77## Nice to have
78- Allow compilation using Makefile/CMake on macOS
79