From: Scott E. <sc...@ju...> - 2013-09-06 08:52:22
|
The clocks for McBSP (and SPI) need to be inputs. Here's a working system with an McBSP3 driver (I just happened to be working on one) === MCBSP3_CLKX mux root@overo:~# devmem2 0x48002178 h /dev/mem opened. Memory mapped at address 0x4015c000. Read at address 0x48002178 (0x4015c178): 0x0101 === MCBSP3_FSX mux root@overo:~# devmem2 0x4800217a h /dev/mem opened. Memory mapped at address 0x40157000. Read at address 0x4800217A (0x4015717a): 0x0101 === The driver root@overo:~# lsmod Module Size Used by ads1278 8677 0 === A userland test program root@overo:~# ./adswatch ===== Driver config ===== block_size: 8192 state: MCBSP_REQUESTED | MCBSP_CONFIG_SET mode: HIGH SPEED mcbsp_clkdiv 16 trigger_duration: 10 us flash_delay: 1000 us flash_duration: 5000 us cycle_duration: 100 ms ========================= (use ctrl-c to stop) Total: 157 Blocks: 9 Elapsed: 101 Samples/sec: 22811 ^C (GETTING DATA) === Remux MCBSP3_CLKX as an output root@overo:~# devmem2 0x48002178 h 0x0001 /dev/mem opened. Memory mapped at address 0x400b9000. Read at address 0x48002178 (0x400b9178): 0x0101 Write at address 0x48002178 (0x400b9178): 0x0001, readback 0x0001 === Test the driver root@overo:~# ./adswatch ===== Driver config ===== block_size: 8192 state: MCBSP_REQUESTED mode: HIGH SPEED mcbsp_clkdiv 16 trigger_duration: 10 us flash_delay: 1000 us flash_duration: 5000 us cycle_duration: 100 ms ========================= (use ctrl-c to stop) (NO DATA) === Put the mux for CLKX back to input root@overo:~# devmem2 0x48002178 h 0x0101 /dev/mem opened. Memory mapped at address 0x40162000. Read at address 0x48002178 (0x40162178): 0x0001 Write at address 0x48002178 (0x40162178): 0x0101, readback 0x0101 === Test the driver root@overo:~# ./adswatch ===== Driver config ===== block_size: 8192 state: MCBSP_REQUESTED | MCBSP_CONFIG_SET mode: HIGH SPEED mcbsp_clkdiv 16 trigger_duration: 10 us flash_delay: 1000 us flash_duration: 5000 us cycle_duration: 100 ms ========================= (use ctrl-c to stop) Total: 111 Blocks: 10 Elapsed: 101 Samples/sec: 25346 ^C (GETTING DATA) === Remux MCBSP3_FSX as an output root@overo:~# devmem2 0x4800217a h 0x0001 /dev/mem opened. Memory mapped at address 0x400a4000. Read at address 0x4800217A (0x400a417a): 0x0101 Write at address 0x4800217A (0x400a417a): 0x0001, readback 0x0001 === Test the driver root@overo:~# ./adswatch ===== Driver config ===== block_size: 8192 state: MCBSP_REQUESTED | MCBSP_CONFIG_SET mode: HIGH SPEED mcbsp_clkdiv 16 trigger_duration: 10 us flash_delay: 1000 us flash_duration: 5000 us cycle_duration: 100 ms ========================= (use ctrl-c to stop) (NO DATA) === Put the FSX mux back to inpu root@overo:~# devmem2 0x4800217a h 0x0101 /dev/mem opened. Memory mapped at address 0x4005e000. Read at address 0x4800217A (0x4005e17a): 0x0001 Write at address 0x4800217A (0x4005e17a): 0x0101, readback 0x0101 === Test the driver root@overo:~# ./adswatch ===== Driver config ===== block_size: 8192 state: MCBSP_REQUESTED | MCBSP_CONFIG_SET mode: HIGH SPEED mcbsp_clkdiv 16 trigger_duration: 10 us flash_delay: 1000 us flash_duration: 5000 us cycle_duration: 100 ms ========================= (use ctrl-c to stop) Total: 407 Blocks: 10 Elapsed: 101 Samples/sec: 25346 ^C (GETTING DATA) -- View this message in context: http://gumstix.8.x6.nabble.com/Newbie-Problems-Cross-Compilation-and-McBSP-with-Overo-Waterstorm-and-Alcatraz-Board-tp4967756p4967877.html Sent from the Gumstix mailing list archive at Nabble.com. |