Home
Developer Resources
Technical Articles

QNX Technical Articles

QNX® Momentics® 6.3.0 Freescale Total5200 / Lite5200EVB BSP 1.0.2 Release Notes

QNX® Momentics® 6.3.0

Date of this edition: September 21, 2005

Target OS: QNX® Neutrino® 6.3.0 SP2

Host OS: Microsoft Windows XP SP1 or SP2, 2000 SP4, or NT SP6a; Sun Solaris 7, 8, or 9; QNX® Neutrino® 6.3.0; Linux Red Hat 8, 9, or Enterprise WS 3 or 4

Boards supported: Freescale Lite5200 EVB Rev2 and Total5200 Rev1 and Rev2


Note:
  • You need to have installed the QNX Momentics 6.3.0 SP2 before installing this BSP.
  • For information on installing this BSP, see the installation note.
  • If you install SP2, you should also install the latest version of the QNX Momentics Character Driver Development Kit (DDK), if you installed an earlier version of it. Significant changes have been made to this DDK; please see the Character DDK Release Notes.
  • For the most up-to-date version of these release notes, log into your myQNX account, and then go to the Download Center area of www.qnx.com.

Contents


Note: Throughout this document, you may see reference numbers associated with particular issues, changes, etc. When corresponding with our Technical Support staff about a given issue, please quote the relevant reference number. You might also find the reference numbers useful for tracking issues as they become fixed.

What's in this BSP?

This BSP contains:

  • Binary components
  • Source code
  • Documentation.

Note: The source code requires a BSP Source License.

Binary components

  • IPL
  • Startup
  • PCI server
  • Serial driver
  • Network driver
  • Bestcomm DMA library
  • Bestcomm utility
  • USB support
  • EIDE driver
  • Audio driver (Total5200 only)
  • Graphics driver (Total5200 only)
  • SPI driver (Total5200 only)
  • I2C driver (Total5200 only)
  • Touchscreen (Total5200 only).

Source code

  • IPL
  • Startup
  • PCI server
  • Serial driver
  • Network driver
  • Audio driver (Total5200 only)
  • Graphics driver (Total5200 only)
  • SPI driver (Total5200 only)
  • I2C driver (Total5200 only)
  • Touchscreen (Total5200 only)
  • Flash driver.

Note: The flash filesystem library is included in the separately available Flash Filesystem & Embedding Technology Development Kit (TDK).

Documentation

  • Freescale Total5200 / Lite5200EVB BSP readme (HTML)

Note:

Each BSP guide contains board-specific information and instructions on building an OS image for that particular board.

The procedure for building BSPs has changed since QNX Momentics 6.2.1. For instance, you must now run the . ./setenv.sh script before compiling your BSP source. If you fail to run this shell script prior to building the BSP, you can overwrite existing binaries or libs that are installed in $QNX_TARGET. For details, see the chapter "Working with a BSP" in the Building Embedded Systems manual (in the Documentation Roadmap page under the QNX Neutrino RTOS section).


Location of source and documentation

When you install BSPs, you'll find the source code and documentation in the following locations:

Windows hosts

Component Location
Source code $QNX_TARGET\usr\src\archives\qnx\
Documentation $QNX_TARGET\usr\help\product\bsp_index.html
Release notes $QNX_TARGET\etc\readme\bsp

QNX Neutrino, Linux, and Solaris hosts

Component Location
Source code $QNX_TARGET/usr/src/archives/qnx/
Documentation $QNX_TARGET/usr/help/product/bsp_index.html
Release notes $QNX_TARGET/etc/readme/bsp

Note:
  • To extract the source from the archive, use any application that supports the ZIP format (e.g. WinZIP). For more information, see the chapter "Working with a BSP" in the Building Embedded Systems manual.
  • The "roadmap" page (e.g. from the Windows XP start menu: Release notes-->All Programs-->QNX Momentics 6.3.0-->Documentation) contains links to the various HTML booksets that accompany the OS: System Architecture, Building Embedded Systems, Programmer's Guide, Library Reference, Utilities Reference, etc.

Binaries, buildfiles, IPLs, and other files

Depending on the particular BSP and type of driver, you'll find the files in these locations:

Windows hosts

File Location
Buildfile $QNX_TARGET\cpu\boot\build
IPL and/or startup $QNX_TARGET\cpu\boot\sys
"sbin" drivers (serial, flash, block, PCI, PCMCIA, USB) $QNX_TARGET\cpu\sbin
"dll" drivers (audio, graphics, network) $QNX_TARGET\cpu\lib\dll

QNX Neutrino, Linux, and Solaris hosts

File Location
Buildfile $QNX_TARGET/cpu/boot/build
IPL and/or startup $QNX_TARGET/cpu/boot/sys
"sbin" drivers (serial, flash, block, PCI, PCMCIA, USB) $QNX_TARGET/cpu/sbin
"dll" drivers (audio, graphics, network) $QNX_TARGET/cpu/lib/dll

Fixed issues

  • The MGT5200 default buildfile has the correct io-usb arguments (i.e. io-usb -d ohci-mgt5200 ioport=0xf0001000,irq=70). The documentation is also up-to-date. (Ref# 19846)
  • The MGT5200 default buildfile no longer has the PCI server commented-out.
  • Graphics-intensive applications no longer interfere with the audio DMA channel. (Ref# 20872)
  • During audio playback and or capture, configuration changes such as volume changes now take effect. (Ref# 23698)
  • Both USB ports now work on the Total5200 board. (Ref# 23683)
  • devi-mpc5200 has been optimized to use less CPU (Ref# 23108)

Known issues for this BSP


Note: Please check the version of these release notes on the website for the most up-to-date information.

  • The section of the documentation describing how to put and an IPL and an OS image on the flash using the DBUG ROM monitor is incorrect. (Ref:27383)

    Workaround: Use the following documentation instead:

    1. Transfer the IPL to the target memory and burn it into flash:

          dn /full_path_to_ipl/ipl-mgt5200
          

      Note:
      • When compiling using the command line, the /full_path_to_ipl is /BSP_root_dir/install/ppcbe/boot/sys/
      • When compiling using the IDE, the /full_path_to_ipl is by default /Workspace_root_dir/bsp-freescale-mgt5200_ipl-mgt5200/mgt5200/ppc/be/

      For the Lite5200EVB, the address is 0xff000000:
          fp ff000000 ff00ffff 20000
          

      For the Total5200, the address is 0xfe000000:

          fp 0 fe000000 fe00ffff 20000 (for MGT5200 Rev 1)
          
          fp fe000000 fe00ffff 20000   (for MGT5200 Rev 2)  
          
    2. Transfer the OS image to the target and burn the OS image into flash at address 0xff020000 on the Lite5200EVB, 0xfe040000 on the Total5200:

          dn /full_path_to_image/ifs-mgt5200.srec
          

      Note:
      • When compiling using the command line, the /full_path_to_image is /BSP_root_dir/images/
      • When compiling using the IDE, the /full_path_to_image is by default /Workspace_root_dir/bsp-freescale-mgt5200/Images


      Note: A 6M-64K area has been allocated for the OS image. If your OS image is greater than 6M, then rearrange the flash address range accordingly.

      Lite5200EVB:

          fp ff020000 ff600000 20000
          

      Total5200:

          fp 0 fe040000 fe640000 20000 (for MGT5200 Rev 1)
          

          fp fe040000 fe640000 20000   (for MGT5200 Rev 2)
          
    3. On the Lite5200EVB, turn off the power, set the BH/L jumper (J73-J75) to Low and reboot the board. For the Total5200, simply switch the Address Boot Switch to Low/OS

      The board will boot from the IPL.


    Note: In addition, you can ignore all files generated by the mkflashimage script. The script is not necessary when using the transfer method described above.

  • The Silicon Motion PCI reference cards SMI501, SMI731, and SMI722 aren't supported on the Freescale Lite5200 rev2 board due to hardware incompatibility. This release of the BSP will support the SMI712.
  • If a FIFO error occurs while the audio driver is running (logged by slogger), the driver may need to be restarted to restore correct operation. See the section "Audio concerns" below for details.
  • In Microsoft Windows, certain programs (e.g. Norton Ghost) add directories inside double quotation marks (e.g. ...;"c:\Program Files\Norton Ghost\";...) to your PATH environment variable. This causes the Cygwin spawn() function to fail, which in turn causes cp to fail when called by ln-w. (Ref# 20046)

    Workaround: Modify your PATH environment variable and remove any quotation marks.

  • In those instances where the the ROM monitor's MAC address is different from the one you pass in when running io-net, the host can cache the ROM monitor's address. This can result in a loss of connectivity.

    Workaround: If you need to specify a MAC address to io-net we recommend that you use the same mac address that the ROM monitor uses. This will ensure that if the host caches the ROM monitor's MAC address, you'll still be able to communicate with the target. Otherwise you might need to delete the target's arp entry on your host.

  • Simply uncommenting the io-graphics line in the buildfile isn't enough to run Photon on the target; this line shows how to run the graphics driver only. For more information on embedding Photon on your board, see the Photon in Embedded Systems appendix of the Photon Programmer's Guide.

    To test or evaluate Photon on your target before embedding it you could make the Photon environment accessible to the target by simply mounting your host environment into the target. You'll need to use an NFS or CIFS client on the target depending on the type of server running on your host platform. This example shows how to create a basic Photon configuration using an NFS client.

    1. Uncomment the following sections from the build file: network, usb and graphics
    2. Add the following at the end of the network section:
            fs-nfs3 10.0.0.1:$QNX_TARGET/cpu/ /
                    10.0.0.1:$QNX_TARGET/etc /etc
                    10.0.0.1:$QNX_TARGET/usr/photon /usr/photon &
            
            waitfor /usr/bin
            waitfor /usr/photon
            waitfor /etc
      
            Where 10.0.0.1 is the server IP address
          

      Note: The first three lines of the fs-nfs command comprise one command.

    3. You can now run the Photon drivers.

      To run the graphics driver:

            /usr/photon/bin/Photon &
            waitfor /dev/photon
            /usr/photon/bin/io-graphics -d...
           
      (See the "Devices supported" chapter in the BSP documentation for details on the graphics driver options).

      To use a usb mouse and keyboard:

            /sbin/io-hid -dusb
            /usr/photon/bin/devi-hid kbd mouse &
         

  • If you specify the -d and -p options for io-graphics, you must put the -d option before the -p, or else io-graphics fails. (Ref# 22670)
  • Hardware flow control doesn't currently work for the serial driver. (Ref# 21615)
  • The TCP/IP stack obtains a timer from the process manager. This timer starts at 0. If the TCP/IP stack and a TCP/IP application that tries to connect to a remote host start executing too soon, the TCP/IP stack may apply a time of 0 seconds to ARP cache entry structures. If this occurs, you may end up with a permanent ARP entry (i.e. one that never times out). You can also end up with permanent, incomplete ARP entries that never time out, and that the TCP/IP stack doesn't attempt to resolve. If this happens, your host won't be able to communicate with one or (possibly) more remote hosts (i.e. the ones the TCP/IP application in the OS image is trying to reach).

    You can check for permanent ARP entries by running the arp -an command and examining the output. The only permanent entries listed should be for the IP addresses assigned to your host's interfaces; there shouldn't be any permanent, incomplete entries. If you find a permanent entry that isn't for the IP address of an interface on your host, and you didn't explicitly create a permanent entry, then you could be encountering this problem. (Ref# 21395)

    Workaround: In the buildfile for your OS image, delay the start of the TCP/IP stack or the first TCP/IP application by at least one second, by using the sleep command (e.g. sleep 1) or some other delay mechanism.

  • The Freescale Lite5200 on-board USB driver will fail to recognize USB devices, due to a hardware mismatch.

    Workaround: The USB transceiver on the Lite5200 boards (version 2.0, Rev G) is sensitive to a resistor value that worked with the previous transceiver version. That resistor is R164. If you replace the R164 with a 0-Ohm resistor, or short it out with a wire, then the USB should work. (Ref# 17481)

Audio concerns

The MPC5200 has six Programmable Serial Controllers (PSCs), which can be used to stream audio data into and out of the MPC5200. Two of the PSCs have an operating mode designed to connect to AC'97 codecs. However, the AC'97 mode on the MPC5200 lacks a full implementation of an AC'97 physical interface. This can cause several significant failure modes of the audio driver.

  • If the PSC FIFO becomes empty, framing with the codec will be lost. This may cause the audio to no longer be heard correctly and/or the codec interface may shutdown completely. In either case the driver will need to be restarted to clear this condition. The driver will put a message of "mpc5200: FiFo Interrupt (###,###,###,###)" into slogger if this condition occurs.
  • In order to adjust the codec while audio playback is running the driver must inject codec commands into the frame stream of the PSC. With this technique it's possible for codec commands to fail. This means that a volume adjustment during playback may sometimes have no effect.

All applications using the MPC5200 AC'97 driver can be affected by these problems, with careful system design and integration the impact of these issues can be minimized. Some platform operations such as disabling interrupts for more then a few instructions will increase the likely hood of these problems occurring and therefore should be avoided during system design. In the same way having any processes or interrupt service routines that prevent the audio driver interrupt threads from executing on time intensify the chances of these issues occurring.

Before explaining these conditions in detail it's necessary to describe the basic workings of the AC'97 audio system. The system consists of two primary components:

  • the codec -- is responsible for all analog signal control and for the analog to digital conversion (ADC) as well as the digital to analog conversion (DAC).
  • the digital controller -- is responsible for transferring the digital PCM streams to the codec and for changing codec internal registers that control the codec operation.

The two components communicate via a bi-directional five wire serial TDM interface. The data flowing across this link is formatted as input and output frames that are transferred at the rate of 48000 frames per second. A simplified format of these frames is shown below:

PSC output (serial data out)

Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slots 5-12
TAG Cmd Addr Cmd Data PCM LEFT PCM RIGHT unused

CODEC output (serial data in)

Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slots 5-12
TAG Status Addr Status Data PCM LEFT PCM RIGHT unused

In this simplified view the codec provides the data and frame synchronization clock for the communication. The controller must detect the start of frame signal so that it can begin sending its output frame and begin decoding the input frame at the correct time.

The "Cmd" slots hold codec commands for reading and writing codec controls; the "Status" slots hold the results for the last command received, and the PCM slots hold the PCM data for the audio streams. The Tag slots are used to signal the validity of the other slots and for support of the Sample rate conversion in the codec. To achieve sample rates different from the frame rate (48 KHz) the codec uses the tag bits to control the data transfer.

The MPC5200 implements the AC'97 controller using a Programmable Serial Controller (PSC), but the limited functionality of the PSC can cause several issues for the device driver.

The first issue that can happen is random "Cmd" data being sent to the codec. This condition occurs if the DMA engine does not fill the PSC Transmit FIFO quickly enough. This situation causes the PSC to lose frame synchronization with the codec, so when the FIFO is later filled that data will be sent in any slot of the frame. This means that the PCM data can be sent in the "Cmd" slots. Since the PCM data can be any value, the effects on the codec are not defined.

The second issue is getting codec commands such as volume changes to occur in a timely manner. To accomplish this, the audio driver must inject these commands into the PSC data stream such that the commands are transferred to the codec in the earliest possible frame. To do this the driver needs to know with accuracy where in a DMA buffer the DMA engine is. There are issues with the current Bestcomm DMA implementation that may prevent this technique from working consistently.

The third issue is also caused by the PSC limited functionality; the PSC does not understand the AC'97 frame but simply transmits and receives data. This means it's not possible to use the sample rate converters in the codec. This feature of AC'97 is called Variable Rate Audio (VRA) and requires that the controller support "on demand" slot request bits. In short, the codec sets a slot request bit whenever it needs data.

As an example, for a playback rate of 44100 Hz the codec would set the slot requests bits in 441 of 480 frames transferred. Since the PSC does not interpret the request bits, this feature is not useable. The situation then requires the audio architecture or the application to perform rate conversion in software. This conversion requires CPU power to perform. As the quality of the conversion gets better, the CPU requires more power.

Technical support

If you have any questions, comments, or problems with a QNX product, please contact Technical Support. For more information, see the How to Get Help chapter of the Welcome to QNX Momentics guide or visit our website, www.qnx.com.