2010年4月11日星期日

DM365的GPIO作中断源

It's seem that only bank0 and bank6 could be set as interrupt according with tms320dm365.pdf, But in sprufh8b.pdf, it's said that 'All GPIO signals can be used as interrupt sources with configurable edge detection.' How I could use the other gpios as interrupt souce?

See Table 54 of the ARM subsystem guide to see which GPIOs can be connected to ARM interrupts (sprufg5.pdf).
Basically, if you are using ethernet and uart there's only 1 GPIO left to be configured for an interrupt (GPIO0). This is a bummer.

One more thing to note is that, in case you are using LSP 2.10.xx.xx for DM365, you would not be able to use any GPIO as interrupt because GPIO driver does not support interrupt mode in LSP 2.10.xx.xx

As mentioned, there is only one GPIO left out to be used as interrupt if you are using ethernet. And if you want to use it as interrupt, you would have to write a small kernel module to program the interrupt controller registers.

LSP 2.10.xx.xx does not support GPIO interrupts at all, not even for GPIO0. You will need to write your own driver to support GPIO interrupts...

In the "Known Issues" section of "LSP 2.10 release version 02.10.00.14 - July 9, 2009" the following bullet is listed:
"SDOCM00051972: GPIO pin configured in the interrupt mode does not work"



DM365同时实现H.264和JPEG双码流输出

DM365的HDVCP和IMCOP是两个独立单元,H.264编码和JPEG编码运行在两个不同的硬件引擎,但是目前TI的编码库(H.264和JPEG)共享一些资源,比如EDMA通道和内存等。因为这个原因,要在DM365上实现H.264和JPEG双码流输出,就得让二者按序运行。TI目前提供了一些机制来并行输出双码流,相应的设置流程为:
1. Use scratchGroup Id = 1 for H.264 encoder, scratchGroupId = 2 for JPEG in your .cfg file
2. Release some EDMA channels from the kernel. You have to free atleast 4-6 channels and it can be done in edma.c in the linux kernel source code. The choice of channels to remove depends on your use case and the peripherals you use.
3. Turn on enableDDR parameter of H.264 encoder.
If you have IPNC Reference Design software, you can refer to it for item #1 and #3. But in IPNC also, we do not run JPEG and H.264 in parallel.
Please note that MPEG4 and H.264 cannot run in parallel due to EDMA channel limitation, so keep them both in some scratchGroupId.