TI E2E Community
How to program in Linux to control LEDs?
I'm working on OMAP L137. Now the evm is able to boot from nandflash and work properly. The DSPLINK samples also work properly.
How to get started with programming from gpp side, for instance, toggle LEDs?(Is there wiki on it?)
Ti has some basics that is not specific to the OMAP-L137 on their wiki:
There are lot of examples on this forum and the internet. For userspace, search for "/sys/class/gpio". The hard part is recompiling the Linux kernel to configure the pinmux for your LED. The TI wik has the same info as the setup packages and more. Maybe start here:
The module where pinmux config is done for the OMAP-L137 EVM is usually
Take care to avoid using a pin that is already being used by some other peripheral.
Thanks for your response Norman.
I'v read Getting_Started_Guide_for_OMAP-L137 already but it refered litte little about gpp programming.
If I connect a CPLD with EMIFA, should I need writing driver for it? Can I read or write the CPLD simply use "ioremap" and "iowrite(ioread)"?
void __iomem *reg_virt = ioremap(physical_addr, num);
You should probably start as new thread for each question. I have feeling that you will get more answers that way. I believe the support guys loathe the "support user X forever" kind of threads.
I've accessed a CPLD from the BIOS/DSP side. Never done it from the Linux/ARM side. Principles should be the same. Pinmux the EMIFA pins and set the appropriate EMIF CEnCFG config register. There is a some precedence on the Linux side with the NOR EMIFA driver. See EMIFA NOR code in
You are on the right track with the io API and the mapping of physical to virtual space. The davinci-nor.c uses the ioremap() to map a block of registers rather than one location. They will use raw_readl, etc. to access a location offset into the block.
Note that EMIFA pins overlap badly with other peripherals. For me. the SD Card had to share the bus with the CPLD.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.