Go to advanced search

by JovianPyx
Wed Mar 09, 2016 4:38 pm
Forum: HATs and other add-ons
Topic: Raspberry Pi 2 with Cirrus/Element14 Audio Card Question
Replies: 3
Views: 995

Raspberry Pi 2 with Cirrus/Element14 Audio Card Question

Raspberry Pi 2 B Arch Linux 4.1.13 I am currently using a Raspberry Pi 2 B with the Cirrus/Element14 audio board. It works wonderfully well, however, the driver came as part of a patch kernel 4.1.13. I downloaded the kernel pre-patched. My question: Will there be a driver that does not require a pat...
by JovianPyx
Mon Feb 29, 2016 12:36 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Yeah, I tried the Python code and it did not work as you say because ttymidi just over-writes the settings. Please see the PM I sent you.
by JovianPyx
Mon Feb 29, 2016 11:51 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

The information about mmap() provided here works for Arch Linux kernel 4.1.13. I've not updated my kernel because I have the Cirrus/Element14 sound board and the driver comes as part of a pre-patched kernel. I currently have it running with the console UART port at 31250 baud. The "hack" uses the mm...
by JovianPyx
Sat Feb 27, 2016 2:00 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Polled UART for MIDI Input
Replies: 1
Views: 646

Re: Polled UART for MIDI Input

In case others need this information, I'll post the solution I implemented. To allow a polled UART driver to run, mmap mapping can be used to directly control the UART. The main problem I had to solve was how to disable the kernel UART driver. This is the amba-pl011 driver which is an internal modul...
by JovianPyx
Fri Feb 26, 2016 12:02 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Polled UART for MIDI Input
Replies: 1
Views: 646

Polled UART for MIDI Input

Raspberry Pi 2 B Arch Linux 4.1.13 I've been able to use the console UART (/dev/ttyAMA0) for a MIDI input by setting the baud rate to 31250 and adding an optoisolator. I'm having problems with the way the kernel buffers the incoming data and blurts it out in little spurts instead of each byte being ...
by JovianPyx
Thu Feb 25, 2016 5:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Raspberry Pi 2 B, Arch Linux kernel 4.1.13 Now that I have the console UART running at 31250 baud, I've been able to develop a MIDI polysynth that works - almost. The problem is that I had expected the MIDI data bytes to come to the read() function no quicker than one every 320 uSec. Given a period ...
by JovianPyx
Fri Jan 29, 2016 2:45 pm
Forum: C/C++
Topic: C program to play a WAV file
Replies: 11
Views: 20618

Re: C program to play a WAV file

Raspberry Pi 2 B with Cirrus Logic - Element 14 sound board Arch Linux 4.1.13 I too am interested in ALSA coding and found http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html The program pcm.c plays a sinewave using one of several command line selectable transfer methods. The s...
by JovianPyx
Wed Jan 20, 2016 11:03 pm
Forum: Bare metal, Assembly language
Topic: Hardware Virtualization Options on RPi 2
Replies: 6
Views: 2337

Re: Hardware Virtualization Options on RPi 2

This might be what you are looking for : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=45081 Alternatively , the isolcpus kernel commandline parameter might be interesting. ghans I looked at KVM and I'm not thrilled about going through yet more layers of OS stuff since I'm hoping to have ...
by JovianPyx
Mon Jan 11, 2016 12:50 pm
Forum: Beginners
Topic: usb external hard drive not mounting
Replies: 4
Views: 1505

Re: usb external hard drive not mounting

I've recently added a USB 2.0 500G Toshiba portable hard drive to my RPi2 and it works great. I had also ordered an externally powered USB hub which arrived later than the disk drive. When I first tried to connect the disk drive (without the hub), it seemed to work, but it beeped. From google I lear...
by JovianPyx
Thu Jan 07, 2016 8:29 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Sorry about that. #define BLOCK_SIZE 4096 Absolutely no need to apologize StuartF - with your helpful code, I've been able to modify ttymidi to run with a baud rate of 31250 and it works!! No more hardware baud rate converter needed. I had to mess with the code a bit, VMIN needed to be set to 1, bu...
by JovianPyx
Thu Jan 07, 2016 5:25 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

This has worked for me using the standard bcm2709.uart_clock=3000000 clock setting in cmdline.txt with the ttyAMA0 default removed. It uses mmap to directly set the PL011 registers according to the ARM datasheet. I've been able to resolve all of the compiler problems except for BLOCK_SIZE which is ...
by JovianPyx
Thu Jan 07, 2016 11:48 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Thanks, but I'm reluctant to modify the kernel. I use an already modified kernel (I downloaded, not compiled) because I use the Cirrus/Element14 audio board. If I can do it the way StuartF described, there's no need to modify the kernel.
by JovianPyx
Thu Jan 07, 2016 1:04 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Thank you for posting that. Funny that I see this just after completing the hardware baud rate converter which works like a champ - however, the C code you posted looks promising and I think I'll take another look at modifying how ttymidi opens /dev/ttyAMA0. At least I now know that my compiled ttym...
by JovianPyx
Wed Jan 06, 2016 5:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

For the time being, I've given up on changing the UART baud rate to nonstandard 31250. I tried to modify ttymidi with no success. Since I really need only MIDI input to the Pi2, I've decided to just build a little PIC board to do baud rate conversion from a MIDI input to a serial (logic level) outp...
by JovianPyx
Wed Jan 06, 2016 3:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

For the time being, I've given up on changing the UART baud rate to nonstandard 31250. I tried to modify ttymidi with no success. Since I really need only MIDI input to the Pi2, I've decided to just build a little PIC board to do baud rate conversion from a MIDI input to a serial (logic level) outpu...
by JovianPyx
Mon Jan 04, 2016 11:32 pm
Forum: Graphics, sound and multimedia
Topic: Midi Interface, total newbie
Replies: 16
Views: 30679

Re: Midi Interface, total newbie

That gets you the software side of MIDI but doesn't provide the hardware side that used to let you wire a MIDI instrument to a PC soundcard (first seen on Apple ][, Apple ][e and C64s). That could be an interesting hardware project. http://zuzebox.wordpress.com/2012/03/18/midi-breakout-board-for-ra...
by JovianPyx
Mon Jan 04, 2016 3:14 pm
Forum: Bare metal, Assembly language
Topic: Hardware Virtualization Options on RPi 2
Replies: 6
Views: 2337

Re: RTOS - which? status?

Perhaps you should look into virtualization instead ? You could have different OS running at different "priorities" with this approach. ghans Thank you! Can you suggest posts/reading material for how this is accomplished (especially for Rpi2)? I assume this refers to KVM (Kernel-based Virtual Machi...
by JovianPyx
Mon Jan 04, 2016 2:56 pm
Forum: Bare metal, Assembly language
Topic: Hardware Virtualization Options on RPi 2
Replies: 6
Views: 2337

Hardware Virtualization Options on RPi 2

I too am looking at RTOS for a self-contained MIDI musical instrument project on a Raspberry Pi 2B. What I would like to have may or may not be currently possible, but I'll throw it out there and see what folks say. I have the Cirrus/Element14 audio card which works well under Arch Linux kernel 4.1....
by JovianPyx
Wed Dec 30, 2015 3:23 pm
Forum: General discussion
Topic: kernel 4 breaks changing UART clock
Replies: 1
Views: 522

kernel 4 breaks changing UART clock

Raspberry Pi 2 B running Arch Linux with kernel 4.1.13 I've been trying to use the console UART (/dev/ttyAMA0) for MIDI input and output and am having no success. Google shows a solution that works for kernel 3.x, but I've tried that and it doesn't work for kernel 4.1.13. The method involves setting...
by JovianPyx
Tue Dec 29, 2015 4:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Some negative progress it seems. Since I was able to compile and setup ttymidi and make ALSA connections to it, I thought it would be simple to get MIDI data from a keyboard into the Pi2 to (for example) play ZynAddSubFX or other MIDI capable synth. All I got was garbage, but I had started ttymidi w...
by JovianPyx
Tue Dec 29, 2015 4:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

That's interesting - are you using the serial port for MIDI? Have you had success? I've just finished making a little adapter with an optoisolator and hooked it up to the Pi2. So far, I get garbage when I send messages with a MIDI controller keyboard. Can't say why yet, oscope says the signal looks ...
by JovianPyx
Mon Dec 28, 2015 3:08 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Quite by accident, I discovered a workaround for this problem. I found some python code someone blogged for testing a serial connection and from it I made a simple baud rate setting program. Measuring the bit time (using bitscope) gives the desired result of 32 uSec per bit. This appears to be a wor...
by JovianPyx
Mon Dec 28, 2015 11:09 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

I've tried it several times and it does not work for me to set it to 31250 at boot time. When I try that (which I just now did), I measure the bit time at 52 uSec which is equivalent to 19200 baud, not 31250 (which should be 32 uSec). So there is something else that is happening that prevents this. ...
by JovianPyx
Mon Dec 28, 2015 4:44 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

Re: RPi2 UART Baud Rate

Yes, I did try to set the baud rate to 31250 with: stty -F /dev/ttyAMA0 31250 which returns an error message: stty: invalid argument '31250' I also tried to set it with init_uart_baud=31250 in config.txt My understanding was that using 38400 with the default UART clock of 3000000 would give 38400 an...
by JovianPyx
Mon Dec 28, 2015 3:10 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RPi2 UART Baud Rate
Replies: 28
Views: 12044

RPi2 UART Baud Rate

Raspberry Pi 2 B Arch Linux kernel 4.1.13 I've read in this thread: https://www.raspberrypi.org/forums/viewtopic.php?t=113753&p=778141 near the end (page 6 I believe) about changing the UART speed to accomodate MIDI. I would like to change the baud rate of /dev/ttyAMA0 to a nonstandard value of 3125...

Go to advanced search