Back to home page

LXR

 
 

    


Warning, /bsps/lm32/milkymist/README.md is written in an unsupported language. File is not indexed.

0001 milkymist
0002 =========
0003 
0004 Full RTEMS port to the Milkymist One. Supports Milkymist SoC 1.0.x.
0005 
0006 Includes drivers for:
0007 - Multi-standard video input (PAL/SECAM/NTSC)
0008 - Two DMX512 (RS485) ports
0009 - MIDI IN and MIDI OUT ports
0010 - VGA output
0011 - AC'97 audio
0012 - NOR flash
0013 - 10/100 Ethernet
0014 - Memory card (experimental and incomplete)
0015 - USB host connectors (input devices only, using the softusb-input firmware)
0016 - RC5 infrared receiver
0017 - RS232 debug port
0018 
0019 For more information: http://www.milkymist.org/
0020 
0021 
0022 UART
0023 ----
0024 Initialization:
0025 
0026         set the CSR_UART_DIVISOR to the correct VALUE,
0027         depending on the internal frequency of the LatticeMico32 softcore.
0028 
0029         for the ML401 board, this value is calculated using this formula : clk_frequency/230400/16
0030         clk_frequency  = 100000000 Hz
0031         => we must set CSR_UART_DIVISOR to 27
0032 
0033 How to send a byte to uart : 
0034 
0035 ```c
0036 void writechar(char c)
0037 {
0038                 CSR_UART_RXTX = c;
0039                 while(!(irq_pending() & IRQ_UARTTX));
0040                 irq_ack(IRQ_UARTTX);
0041 }
0042 ```
0043 
0044 How to receive a byte from uart : 
0045 
0046 
0047 ```c
0048 char readchar()
0049 {
0050         char c;
0051         while(!(irq_pending() & IRQ_UARTRX));
0052         irq_ack(IRQ_UARTRX);
0053         c = CSR_UART_RXTX;
0054         return c;
0055 }
0056 ```