Discussion:
The Shenzhou board MMCSD SPI driver problem.
(too old to reply)
Gong Darcy
2012-10-13 03:58:30 UTC
Permalink
hi Greg,

I SDCard drive can not be used.Can you tell me whether the operation process

I used tf card. 2G and 8G.

darcy

NuttShell (NSH)
nsh> ls
/:
dev/
nsh> ls dev
/dev:
console
mmcsd0
null
ttyS0
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
NuttShell (NSH)
nsh> ifconfig
eth0 HWaddr 00:e0:de:ad:be:ef
IPaddr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0

uIP IP TCP UDP ICMP
Received 0006 0000 0000 0000
Dropped 0006 0000 0000 0000
IP VHL: 0000 HBL: 0000
LBL: 0000 Frg: 0000
Checksum 0000 0000 0000 ----
TCP ACK: 0000 SYN: 0000
RST: 0000 0000
Type 0000 ---- ---- 0000
Sent ---- 0000 0000 0000
Rexmit ---- 0000 ---- ----

nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
nsh: mount: mount failed: 19
nsh>
Gong Darcy
2012-10-13 06:02:36 UTC
Permalink
hi Greg.

my MMCSD0 log:

darcy

nsh> AþCDE
AþCDE
stm32_sdinitialize: Initializing SPI port 1
stm32_sdinitialize: Successfully initialized SPI port 1
stm32_sdinitialize: Binding SPI port 1 to MMC/SD slot 0
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
stm32_sdinitialize: Successfuly bound SPI port 1 to MMC/SD slot 0
AþCDE
stm32_sdinitialize: Initializing SPI port 1
stm32_sdinitialize: Successfully initialized SPI port 1
stm32_sdinitialize: Binding SPI port 1 to MMC/SD slot 0
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
stm32_sdinitialize: Successfuly bound SPI port 1 to MMC/SD slot 0
nsh_telnetstart: Starting the Telnet daemon

NuttShell (NSH)
nsh> ls
/:
dev/
nsh> ls /dev
/dev:
console
mmcsd0
null
ttyS0
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mkfatfs /dev/mmcsd0
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
open_blockdriver: /dev/mmcsd0 driver open failed
mkfatfs: Failed to open /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
Post by Gong Darcy
hi Greg,
I SDCard drive can not be used.Can you tell me whether the operation process
I used tf card. 2G and 8G.
darcy
NuttShell (NSH)
nsh> ls
dev/
nsh> ls dev
console
mmcsd0
null
ttyS0
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
NuttShell (NSH)
nsh> ifconfig
eth0 HWaddr 00:e0:de:ad:be:ef
IPaddr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
uIP IP TCP UDP ICMP
Received 0006 0000 0000 0000
Dropped 0006 0000 0000 0000
IP VHL: 0000 HBL: 0000
LBL: 0000 Frg: 0000
Checksum 0000 0000 0000 ----
TCP ACK: 0000 SYN: 0000
RST: 0000 0000
Type 0000 ---- ---- 0000
Sent ---- 0000 0000 0000
Rexmit ---- 0000 ---- ----
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
nsh: mount: mount failed: 19
nsh>
jim z
2012-11-26 23:43:48 UTC
Permalink
Hi Darcy,
1, SD card CS pin; It active low, so it should go low when you try to mount SD card;
2, CLK pin; it should have a clock signal;
3, TX pin. MCU should sending data through this pin;
4, RX pin. It looks like your SD card RX pin always low. The correct should have some data. For CMD0, it should return 0x01;

Please let me know your detail in order to analysis your problem

Hm



________________________________
From: Gong Darcy <darcy.gong-***@public.gmane.org>
To: nuttx-***@public.gmane.org
Sent: Friday, October 12, 2012 11:02:36 PM
Subject: [nuttx] Re: The Shenzhou board MMCSD SPI driver problem.


 
hi Greg.

my MMCSD0 log:

darcy

nsh> ADE
ADE
stm32_sdinitialize: Initializing SPI port 1
stm32_sdinitialize: Successfully initialized SPI port 1
stm32_sdinitialize: Binding SPI port 1 to MMC/SD slot 0
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
stm32_sdinitialize: Successfuly bound SPI port 1 to MMC/SD slot 0
ADE
stm32_sdinitialize: Initializing SPI port 1
stm32_sdinitialize: Successfully initialized SPI port 1
stm32_sdinitialize: Binding SPI port 1 to MMC/SD slot 0
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
stm32_sdinitialize: Successfuly bound SPI port 1 to MMC/SD slot 0
nsh_telnetstart: Starting the Telnet daemon

NuttShell (NSH)
nsh> ls
/:
dev/
nsh> ls /dev
/dev:
console
mmcsd0
null
ttyS0
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mkfatfs /dev/mmcsd0
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
open_blockdriver: /dev/mmcsd0 driver open failed
mkfatfs: Failed to open /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
Post by Gong Darcy
hi Greg,
I SDCard drive can not be used.Can you tell me whether the operation process
I used tf card. 2G and 8G.
darcy
NuttShell (NSH)
nsh> ls
dev/
nsh> ls dev
console
mmcsd0
null
ttyS0
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
NuttShell (NSH)
nsh> ifconfig
eth0 HWaddr 00:e0:de:ad:be:ef
IPaddr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
uIP IP TCP UDP ICMP
Received 0006 0000 0000 0000
Dropped 0006 0000 0000 0000
IP VHL: 0000 HBL: 0000
LBL: 0000 Frg: 0000
Checksum 0000 0000 0000 ----
TCP ACK: 0000 SYN: 0000
RST: 0000 0000
Type 0000 ---- ---- 0000
Sent ---- 0000 0000 0000
Rexmit ---- 0000 ---- ----
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
nsh: mount: mount failed: 19
nsh>
Gong Darcy
2012-11-27 05:29:27 UTC
Permalink
hi jim,

Thanks for your help.
This two days I adjust my cloudctrl board application. It has no mmcsd. I
got some basic function. I'm with you again amended Shenzhou board mmcsd
problem. All right?
I think it's about Friday, I can finish the work of cloudctrl ( this week I
have many boring meeting must attend ).
regards

darcy
Post by jim z
**
Hi Darcy,
1, SD card CS pin; It active low, so it should go low when you try to mount SD card;
2, CLK pin; it should have a clock signal;
3, TX pin. MCU should sending data through this pin;
4, RX pin. It looks like your SD card RX pin always low. The correct
should have some data. For CMD0, it should return 0x01;
Please let me know your detail in order to analysis your problem
Hm
------------------------------
*Sent:* Friday, October 12, 2012 11:02:36 PM
*Subject:* [nuttx] Re: The Shenzhou board MMCSD SPI driver problem.
hi Greg.
darcy
nsh> AþCDE
AþCDE
stm32_sdinitialize: Initializing SPI port 1
stm32_sdinitialize: Successfully initialized SPI port 1
stm32_sdinitialize: Binding SPI port 1 to MMC/SD slot 0
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
stm32_sdinitialize: Successfuly bound SPI port 1 to MMC/SD slot 0
AþCDE
stm32_sdinitialize: Initializing SPI port 1
stm32_sdinitialize: Successfully initialized SPI port 1
stm32_sdinitialize: Binding SPI port 1 to MMC/SD slot 0
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
stm32_sdinitialize: Successfuly bound SPI port 1 to MMC/SD slot 0
nsh_telnetstart: Starting the Telnet daemon
NuttShell (NSH)
nsh> ls
dev/
nsh> ls /dev
console
mmcsd0
null
ttyS0
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
mount: Bind method failed: -19
nsh: mount: mount failed: 19
nsh> mkfatfs /dev/mmcsd0
mmcsd_open: Entry
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0
mmcsd_waitready: Card still busy, last response: 00
mmcsd_mediainitialize: Send CMD0 failed: R1=fffffff0
mmcsd_open: Failed to initialize card
open_blockdriver: /dev/mmcsd0 driver open failed
mkfatfs: Failed to open /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
Post by Gong Darcy
hi Greg,
I SDCard drive can not be used.Can you tell me whether the operation
process
Post by Gong Darcy
I used tf card. 2G and 8G.
darcy
NuttShell (NSH)
nsh> ls
dev/
nsh> ls dev
console
mmcsd0
null
ttyS0
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh>
NuttShell (NSH)
nsh> ifconfig
eth0 HWaddr 00:e0:de:ad:be:ef
IPaddr:10.0.0.2 DRaddr:10.0.0.1 Mask:255.255.255.0
uIP IP TCP UDP ICMP
Received 0006 0000 0000 0000
Dropped 0006 0000 0000 0000
IP VHL: 0000 HBL: 0000
LBL: 0000 Frg: 0000
Checksum 0000 0000 0000 ----
TCP ACK: 0000 SYN: 0000
RST: 0000 0000
Type 0000 ---- ---- 0000
Sent ---- 0000 0000 0000
Rexmit ---- 0000 ---- ----
nsh> mkfatfs /dev/mmcsd0
nsh: mkfatfs: mkfatfs failed: 5
nsh> mount -t vfat /dev/mmcsd0 /mnt/fs
nsh: mount: mount failed: 19
nsh>
Gregory N
2012-10-13 12:55:34 UTC
Permalink
Hi, Darcy
Post by Gong Darcy
I SDCard drive can not be used.Can you tell me whether the operation process
Haven't had this discussion before. No, the SD card slot on the Shenzhou board does not work. I was never able to get it to work. There is no SPI communications.

Perhaps you can get it working, but I can be of no help.

Greg
Gong Darcy
2012-10-13 13:05:15 UTC
Permalink
Hi Greg,

I understand.SDCard drivers can not.
Late I will research it. The SPI Flash make a memory now achieve I demanded.

The now DHCPC nor can
I configured
CONFIG_NSH_BUILTIN_APPS = y
CONFIG_NET = y
CONFIG_NETUTILS_DHCPC = y
CONFIG_NSH_DHCPC = y

Now the log:
=========================================
A Hu DE
A Hu DE
A Hu DE
dhcpc_open: MAC: 00: e0: de: ad: be: ef
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER
dhcpc_request: Broadcast DISCOVER

darcy
Post by Gregory N
**
Hi, Darcy
Post by Gong Darcy
I SDCard drive can not be used.Can you tell me whether the operation
process
Haven't had this discussion before. No, the SD card slot on the Shenzhou
board does not work. I was never able to get it to work. There is no SPI
communications.
Perhaps you can get it working, but I can be of no help.
Greg
Gregory N
2012-10-13 13:37:31 UTC
Permalink
Hi, Darcy
Post by Gong Darcy
The now DHCPC nor can
Have you looked at "Tips for Using DHCPC" in apps/netutils/README.txt (http://svn.code.sf.net/p/nuttx/code/trunk/apps/netutils/README.txt).

Greg
Gong Darcy
2012-10-13 14:01:03 UTC
Permalink
hi Greg,

DHCP is OK now.I fill in the configuration does not.
Thanks!!!!

ADC I do not quite understand.Is now the adc can only access once time.
Second failed.

CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,7
CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,7,
m=1,..,3

CONFIG_STM32_TIMn_ADC, how to use, to give an example?
Timer and the sampling of this part, I did not come into contact with.A
little confused.
Thanks!again.

Darcy
Post by Gregory N
**
Hi, Darcy
Post by Gong Darcy
The now DHCPC nor can
Have you looked at "Tips for Using DHCPC" in apps/netutils/README.txt (
http://svn.code.sf.net/p/nuttx/code/trunk/apps/netutils/README.txt).
Greg
Gregory Nutt
2012-10-13 14:14:36 UTC
Permalink
Hi, Darcy,
Post by Gong Darcy
CONFIG_STM32_TIMn_ADC, how to use, to give an example?
Timer and the sampling of this part, I did not come into contact with.A little confused.
There is no F1 examples in the source tree now, but there are discussions about how to configurare to use ADC in
 stm3240g-eval/README.txt and stm3220g-eval/README.txt:

    2. "This example supports the ADC test (apps/examples/adc) but this must  be manually enabled by selecting:

       CONFIG_ADC=y             : Enable the generic ADC infrastructure
       CONFIG_STM32_ADC3=y      : Enable ADC3
       CONFIG_STM32_TIM1=y      : Enable Timer 1
       CONFIG_STM32_TIM1_ADC=y  : Indicate that timer 1 will be used to trigger an ADC
       CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to drive ADC3 sampling
       CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency

      " See also apps/examples/README.txt

      " General debug for analog devices (ADC/DAC):   CONFIG_DEBUG_ANALOG"

Greg
Gong Darcy
2012-10-13 14:27:54 UTC
Permalink
Hi Greg,

I'll test it. Attachments Shenzhou thttpd. Patch.Have been tested.

Thanks!

darcy
Post by Gregory Nutt
**
Hi, Darcy,
Post by Gong Darcy
CONFIG_STM32_TIMn_ADC, how to use, to give an example?
Timer and the sampling of this part, I did not come into contact with.A
little confused.
There is no F1 examples in the source tree now, but there are discussions
about how to configurare to use ADC in
2. "This example supports the ADC test (apps/examples/adc) but this
CONFIG_ADC=y : Enable the generic ADC infrastructure
CONFIG_STM32_ADC3=y : Enable ADC3
CONFIG_STM32_TIM1=y : Enable Timer 1
CONFIG_STM32_TIM1_ADC=y : Indicate that timer 1 will be used to
trigger an ADC
CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to drive ADC3 sampling
CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency
" See also apps/examples/README.txt
" General debug for analog devices (ADC/DAC): CONFIG_DEBUG_ANALOG"
Greg
Gregory Nutt
2012-10-13 15:13:34 UTC
Permalink
Hi, Darcy,
Post by Gong Darcy
Attachments Shenzhou thttpd. Patch.Have been tested.
Checked-in! Thanks,
Greg
Gong Darcy
2012-10-13 14:42:40 UTC
Permalink
Hi Greg,

I set those parameters, the compiler prompts the lack of definition of the
CONFIG_STM32_ADC1_TIMTRIG.
CONFIG_STM32_ADCn_TIMTRIG can be set for 0-4 but I do not quite understand
the definitions.

darcy
Post by Gregory Nutt
**
Hi, Darcy,
Post by Gong Darcy
CONFIG_STM32_TIMn_ADC, how to use, to give an example?
Timer and the sampling of this part, I did not come into contact with.A
little confused.
There is no F1 examples in the source tree now, but there are discussions
about how to configurare to use ADC in
2. "This example supports the ADC test (apps/examples/adc) but this
CONFIG_ADC=y : Enable the generic ADC infrastructure
CONFIG_STM32_ADC3=y : Enable ADC3
CONFIG_STM32_TIM1=y : Enable Timer 1
CONFIG_STM32_TIM1_ADC=y : Indicate that timer 1 will be used to
trigger an ADC
CONFIG_STM32_TIM1_ADC3=y : Assign timer 1 to drive ADC3 sampling
CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100 : Select a sampling frequency
" See also apps/examples/README.txt
" General debug for analog devices (ADC/DAC): CONFIG_DEBUG_ANALOG"
Greg
Continue reading on narkive:
Loading...