Enable CAN on the BeagleBone Green

I've tried to enable CAN on my BeagleBone Green board. I had to stop the work before verification, because my logic analyzer is unavailable now. I record what I did in this article to make things reproducible when the logic analyzer is back. There are several helpful links: http://www.embedded-things.com/bbb/enable-canbus-on-the-beaglebone-black/ http://electronics.stackexchange.com/questions/195416/beaglebone-black-can-bus-setup https://groups.google.com/forum/embed/?place=forum/beagleboard&showsearch=true&showpopout=true&showtabs=false&hideforumtitle=true&parenturl=http%3A%2F%2Fbeagleboard.org%2Fdiscuss%23bone_forum_embed#!category-topic/beagleboard/can/SjWwVngIPh8 Readings to understand device tree overlay: Device Tree for Dummies: http://events.linuxfoundation.jp/sites/events/files/slides/petazzoni-device-tree-dummies.pdf Device Tree Overlays (in adafruit) https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/device-tree-overlays Here are what I did: # make a workspace root@beaglebone:~# mkdir can root@beaglebone:~# cd can root@beaglebone:~/can# pwd /root/can # check if CAN is enabled ... no root@beaglebone:~/can# dmesg | grep can # take backup of the original device tree blob file for…

BeagleBone notes

How to login from MacOS: Connect to the BeagleBone by a USB cable. MacOS restart is necessary for some reason. SSH to 192.168.7.2 WiFi setup: Use connmanctl as described in /etc/network/interfaces. root@beaglebone:~# connmanctl connmanctl> tether wifi disable Error disabling wifi tethering: Already disabled connmanctl> scan wifi Scan completed for wifi connmanctl> services Analog20 wifi_xxxxxxxxxxxxxxxxxxxxxxxxxxx_managed_psk connmanctl> agent on Agent registered connmanctl> connect wifi_xxxxxxxxxxxxxxxxxxxxxxxxxxx_managed_psk ... and so on Following links give useful information: http://xx-prime.hatenablog.com/entry/2016/08/13/012059 (in Japanese) https://www.mail-archive.com/beagleboard@googlegroups.com/msg40785.html The wlan0 device power management can be turned off by # iwconfig wlan0 power off TBD how to turn this off permanently. Take SD backup Insert the SD into the MacBook "diskutil list" to know…

MCP2515 beyond 1MHz

For archival purpose: http://can-bus.996267.n3.nabble.com/Anybody-ever-run-an-MCP2515-at-greater-than-1Mbps-td1859.html you are certainly right about 1Mbps being the maximum speed of the official CAN spec. However, some of us like to break the rules :) I do :) I'm using CAN for a purpose different from controlling automobile so my breaking rule would not cause any death.

Use USB-UART Bridge on PSoC CY8CKIT-049-42xx Kit

You need miniprog3 to program this, despite typical programming to this kit is via boot loader. 1. Put a SCB UART component. Change baud rate to 9600. 2. Assign pins as follows: UART RX : P4[0] UART TX : P4[1] 3. And then, here is the main.c source code int main() { CyGlobalIntEnable; /* Enable global interrupts. */ /* Place your initialization/startup code here (e.g. MyInst_Start()) */ UART_1_Start(); UART_1_UartPutString("Hello world from CY8CKIT-049-42xx\r\n"); for(;;) { /* Place your application code here. */ } } 4. Build it, program it, and connect the CY8CKIT-049-42xx to the PC. That's it.

Generating MCP2515 SPI ‘READ’ Operation Request Using PSoC 42xx

PSoC 42xx provides SPI component that supports up to 4MHz clock speed. Communicating with MCP2515 via this component, however, is not straightforward when you try the highest clock speed. The problem is concept of 'operation' of MCP2515. An operation consists of multiple SPI bytes bundled by 'enable' signal on the CS pin. Lowering the CS pin initiates an operation and it must stay low during the data transmission. See following timing chart quoted from the MCP2515 datasheet. The PSoC SPI component lacks direct control on the CS pin signal. The component automatically lowers the CS level when the write API puts a byte to Tx FIFO and the component's internal…

Module Descriptor and Compiled Parameter Table

I tried Google Protocol Buffers to describe and transfer modules' schema before. This approach, however, did not work well because it required large amount of resources both in program and in RAM spaces of a PSoC processor. It limited available resources for module functionality. I finally gave up the approach. I am trying another approach to describe a module using JSON and to compile it into a parameter table implemented using C macros. The module program does not have to include the schema. Sharing the JSON schema file by Analog 3 modules is good enough. It is nice if the module has the schema internally though. Google Protocol Buffer may…

How to swap control-m and control-j in Emacs

Emacs often changes the behavior suddenly and drastically. Recent surprise to me was that role of ctrl-j (newline and indent) and ctrl-m (newline) switched out of the blue. I don't understand the developer's sense of changing user interface of a multi-decade years old software. But luckily, emacs has very powerful customization ability. Adding this line reverts the key bindings back. (when (fboundp 'electric-indent-mode) (electric-indent-mode -1)) I appreciate this post http://emacs.stackexchange.com/questions/5939/how-to-disable-auto-indentation-of-new-lines

USB Serial Communication with PSoC Pioneer Kit

Exchanging data with PSoC Pioneer Kit over serial communication is often useful. The kit CY8CKIT-042 has a built in USB-to-UART utility programmed in the PSoC 6LP device which is used for onboard debugger for the target PSoC 4. It is easy to use. See below. https://www.element14.com/community/thread/23868/l/psoc-4-pioneer-kit-community-project04-usb-uart-utility?displayFullThread=true

Installed Necessary Applications

I like OS X as a software development platform (and electronic stationery); On the other hand, it's much better to use Windows for hardware development because of better coverage of development tools. As a compromise, I own MacBook and runs Windows under Parallels Desktop for hardware development. I have no issues with this style so far thanks to the powerful USB support by Parallels. My Windows platform has reached disk size full at 64GB. I decided to extend the disk size and re-install everything. Here are highlights of my Windows platform: Windows 10, display language = English PSoC creator 3.2 for the PSoC development platform. 3.3 is installed by I…

MIDI Receiver Module

My PSoC Creator application became unstable suddenly. I could not work on software today. I'm now recovering the software. Meanwhile, I made a MIDI receiver module instead. Developing and debugging MIDI Rx would be easier and less troublesome hopefully. Not yet verified the behavior.