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…

exp() calculation for micro processors

You frequently encounter a situation that exponential function is necessary when you work on a musical instrument project using micro processors.  Its generic implementation is slow and space consuming, so is not suitable for micro processors.  So I need to do some alternative implementations.  For those implementations, space and speed is important but accuracy may be sacrificed in many cases. Follows are articles about fast and compact exp() implementations, for my future reference. http://www.convict.lu/Jeunes/ultimate_stuff/exp_ln_2.htm http://www.quinapalus.com/efunc.html I'm currently using a table lookup approach that I implemented before for an envelope generator I prototyped before.指 This one is still a little slow and large, but it's running in PSoC 4200 without major…

Memo: Maven

Installation How to install Maven on Windows Maven is a Java application, so we are just fine with expanding product zip package and setting environment variables M2_HOME and JAVA_HOME and set PATH. Creating a Maven Project Maven in 5 Minutes Maven in 5 seconds... dothis: mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Stub Synth Module for MOM Development

MOM (Master Of Modules) manages synthesizer modules to make them work as a single musical instrument.  The main responsibilities of MOM are Control patching. Control parameters. Organize voices. (possibly) Organize modules such as device ID management. Designing and implementing MOM and synth module data model is yet another challenge out of building CAN network.  Basically, the inter-module communication depends on CAN physical layer, but it's a pain to dragging such a dependency during the MOM development.  I'm sure the CAN network would be quite unstable at first and I don't want to stop and troubleshoot CAN while I'm working on MOM. So, in order to remove dependency on CAN network,…

MCP2515 CAN Controller

As I mentioned in the previous article, I'll use MCP2515 CAN controller for inter-module communication (initially, at least) for the Analog3 Project. Datasheet of this device is available at the product page. MCP2515 consists of CAN protocol engine, data buffers,  controller, and SPI interface as illustrated in the picture below. You need to attach a processor to make this device functional.  In early phase of the project, I'm thinking of using a Raspberry Pi as the Master Of Modules (mom) and Arduino's for dummy synthesizer modules.  Arduino is not a realistic solution for Analog3 both in terms of cost and performance.  So, I'm thinking of implementing a common synthesizer module…

Changing the Strategy for Analog3

I've been trying for a year to make my own serial interface protocol to exchange data among synth modules.  Though it showed some progress, I kind of giving up this approach.  The problem is complexity of serial interface controller.  A controller for multi-master serial interface is complex.  Implementing using a generic device is more costly in many sense than I expected.  I started with Arduino.  This was the easiest approach but channel was too slow.  I could only achieve 50kbps.  Then I tried implementing it into AVR using assembler language.  It went 100kbps but it was about the limit.  The most serious problem with MPU was that the processing is…

Raspberry Pi I2C clock-stretching problem

The I2C slave that I'm developing has been failing intermittently.  I finally noticed this was a known bug in Raspberry Pi that mishandles clock stretching. I2C slave may delay response by holding SCL low.  However, when the slave does it, the I2C master in Raspberry Pi gives very short clock for the first bit of the next byte.  The symptom can be seen as following picture. More detail explanation can be read in this link: http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html In order to workaround this, I set data rate in I2C slave module higher.  The communication rate is 400 kbps, but I set the data rate 1000 kbps.  It worked for me.  Here is…