Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | Re: EFSL MMC SD sorce code

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Re: EFSL MMC SD sorce code - unal...@gmail.com - Aug 28 6:26:39 2008

Hi Mike ,

I could not find the version 0.2.9.RC4 .

could you please give me a link ?

Thanks

Hi Mike,
>
>I use efsl_0_2_9_RC7_mt_20070903.zip from the page
>
>http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/efsl_arm/
>
>My Circuit is externaly wired sd/mmc connector with 10cm long wires ! But I have already worked o this hardware with another filesytem (sham176_ccfatlib) with the maximum SPI speed without any errors.
>
>I also tried lowes SPI speeds for EFSL , but its still same.
>
>Thanks
>Hi,
>>
>> I am using lpc2106 and SPI0 interface for kingston 2gb sd card.
>>
>> I have the followowing error :
>>
>> MMC/SD Card Filesystem Test (P:LPC2138 L:EFSL)(##)
>> efsl LPC2000-port and this Demo-Application
>> done by Martin Thomas, Kaiserslautern, Germany
>> CARD init...spiInit for SPI(0)
>> Unknown error 0x0 (see SanDisk docs p5-13).
>> Card failed to init, breaking up...
>>
>> What is wrong with it ?
>>
>> if I increase the number of retry to (1000 ~ 10000)
>>
>> in the function
>> if_getDriveSize
>> res = sd_getDriveSize( iface, drive_size );
>> res becomes -1
>>
>> here is the screen
>>
>> MMC/SD Card Filesystem Test (P:LPC2138 L:EFSL)(##)
>> efsl LPC2000-port and this Demo-Application
>> done by Martin Thomas, Kaiserslautern, Germany
>> CARD init...spiInit for SPI(0)
>> Card identified as SD-Card
>> numsec 1073800832 sizesec 88
>> Drive Size is 4 Bytes (4294967295 Sectors)
>> Init done...
>> failed with -2
>>
>> is that something related to command timing ?
>>
>> ------------------------------------
>
>------------------------------------

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


RE: Re: EFSL MMC SD sorce code - Michael Anton - Aug 28 13:34:43 2008



> -----Original Message-----
> From: l...@yahoogroups.com
> [mailto:l...@yahoogroups.com]On Behalf
> Of u...@gmail.com
> Sent: Thursday, August 28, 2008 4:26 AM
> To: l...@yahoogroups.com
> Subject: [lpc2000] Re: EFSL MMC SD sorce code
> Hi Mike ,
>
> I could not find the version 0.2.9.RC4 .
>
> could you please give me a link ?

It is on the page you linked to, but here it is:

http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/efsl_arm/efsl_0_
2_9_rc4b_mt.zip

Mike

>
> Thanks
>
> Hi Mike,
> >
> >I use efsl_0_2_9_RC7_mt_20070903.zip from the page
> >
> >http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/efsl_arm/
> >
> >My Circuit is externaly wired sd/mmc connector with 10cm
> long wires ! But I have already worked o this hardware with
> another filesytem (sham176_ccfatlib) with the maximum SPI
> speed without any errors.
> >
> >I also tried lowes SPI speeds for EFSL , but its still same.
> >
> >Thanks
> >Hi,
> >>
> >> I am using lpc2106 and SPI0 interface for kingston 2gb sd card.
> >>
> >> I have the followowing error :
> >>
> >> MMC/SD Card Filesystem Test (P:LPC2138 L:EFSL)(##)
> >> efsl LPC2000-port and this Demo-Application
> >> done by Martin Thomas, Kaiserslautern, Germany
> >> CARD init...spiInit for SPI(0)
> >> Unknown error 0x0 (see SanDisk docs p5-13).
> >> Card failed to init, breaking up...
> >>
> >> What is wrong with it ?
> >>
> >> if I increase the number of retry to (1000 ~ 10000)
> >>
> >> in the function
> >> if_getDriveSize
> >> res = sd_getDriveSize( iface, drive_size );
> >> res becomes -1
> >>
> >> here is the screen
> >>
> >> MMC/SD Card Filesystem Test (P:LPC2138 L:EFSL)(##)
> >> efsl LPC2000-port and this Demo-Application
> >> done by Martin Thomas, Kaiserslautern, Germany
> >> CARD init...spiInit for SPI(0)
> >> Card identified as SD-Card
> >> numsec 1073800832 sizesec 88
> >> Drive Size is 4 Bytes (4294967295 Sectors)
> >> Init done...
> >> failed with -2
> >>
> >> is that something related to command timing ?
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

PWM on LPC24xx - Herbert Demmel - Sep 1 15:58:07 2008

Hi,

I seem to have problems to understand the PWM (although it's not the
first time I've set one up for the LPC2xxx family).

I run the uC with 72MHz and have set the PCLK for PWM0 to divide by
8. So I would expect to get a 300 Hz signal (with a duty cycle of
50%) out of P3.16, but in fact I get 290 (???) Hz, I don't understand
why. In the specific case it's not a problem not to have exactly 300
Hz, but I simply want to understand what I'm doing wrong. Please see
my test code below.

I've measured the XTAL frequency, it *is* 12.00 MHz and the uC *does*
run with 72 MHz (LPC2478's LCD controller clock is divided by 3 and
*does* give the expected 24MHz).

Any idea is appreciated. Thanks for your help in advance.

Herbert
// Enable PWM on P3.16 = PWM0[1]
PINSEL7 |= (0x02 << 0);

// Leave PWM0CCR as it is (no capture)
// Leave PWM0LER as it is (no latch enable)

// Enable PWM0[1]
PWM0PCR |= (1 << 9);

// Input frequency is 72 / 8 MHz = 9 MHz, we want to have 300 * 1000
Hz, so the prescaler is set as follows:
PWM0PR = 72000000 / 8 / 300 / 1000;

// Reset after 1000 counts
PWM0MR0 = 1000;

// reset on match of PWM0MR0
PWM0MCR |= (1 << 1);

// Set duty cycle of 50%
PWM0MR1 = PWM0MR0 / 2;

// PWM Count Control Register
PWM0CTCR = 0;

// Counter Enable & PWM0 enable
PWM0TCR = (1 << 0) | (1 << 3);
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: PWM on LPC24xx - Leonardo Silva - Sep 1 16:15:51 2008

do PWM0PR = (72000000 / 8 / 300 / 1000) - 1;
PR = 0 means 1 count per 1 clock, 1 count per 0 clocks makes no sense...
so if u want 1 count per x clocks, make PR = x-1.

2008/9/1 Herbert Demmel

> Hi,
>
> I seem to have problems to understand the PWM (although it's not the
> first time I've set one up for the LPC2xxx family).
>
> I run the uC with 72MHz and have set the PCLK for PWM0 to divide by
> 8. So I would expect to get a 300 Hz signal (with a duty cycle of
> 50%) out of P3.16, but in fact I get 290 (???) Hz, I don't understand
> why. In the specific case it's not a problem not to have exactly 300
> Hz, but I simply want to understand what I'm doing wrong. Please see
> my test code below.
>
> I've measured the XTAL frequency, it *is* 12.00 MHz and the uC *does*
> run with 72 MHz (LPC2478's LCD controller clock is divided by 3 and
> *does* give the expected 24MHz).
>
> Any idea is appreciated. Thanks for your help in advance.
>
> Herbert
>
> // Enable PWM on P3.16 = PWM0[1]
> PINSEL7 |= (0x02 << 0);
>
> // Leave PWM0CCR as it is (no capture)
> // Leave PWM0LER as it is (no latch enable)
>
> // Enable PWM0[1]
> PWM0PCR |= (1 << 9);
>
> // Input frequency is 72 / 8 MHz = 9 MHz, we want to have 300 * 1000
> Hz, so the prescaler is set as follows:
> PWM0PR = 72000000 / 8 / 300 / 1000;
>
> // Reset after 1000 counts
> PWM0MR0 = 1000;
>
> // reset on match of PWM0MR0
> PWM0MCR |= (1 << 1);
>
> // Set duty cycle of 50%
> PWM0MR1 = PWM0MR0 / 2;
>
> // PWM Count Control Register
> PWM0CTCR = 0;
>
> // Counter Enable & PWM0 enable
> PWM0TCR = (1 << 0) | (1 << 3);
>
>
>
[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: PWM on LPC24xx - Baldur Gislason - Sep 1 16:18:17 2008

Because the actual value used in the hardware is the value of PR + 1.

Baldur

On Mon, Sep 01, 2008 at 09:57:55PM +0200, Herbert Demmel wrote:
> Hi,
>
> I seem to have problems to understand the PWM (although it's not the
> first time I've set one up for the LPC2xxx family).
>
> I run the uC with 72MHz and have set the PCLK for PWM0 to divide by
> 8. So I would expect to get a 300 Hz signal (with a duty cycle of
> 50%) out of P3.16, but in fact I get 290 (???) Hz, I don't understand
> why. In the specific case it's not a problem not to have exactly 300
> Hz, but I simply want to understand what I'm doing wrong. Please see
> my test code below.
>
> I've measured the XTAL frequency, it *is* 12.00 MHz and the uC *does*
> run with 72 MHz (LPC2478's LCD controller clock is divided by 3 and
> *does* give the expected 24MHz).
>
> Any idea is appreciated. Thanks for your help in advance.
>
> Herbert
> // Enable PWM on P3.16 = PWM0[1]
> PINSEL7 |= (0x02 << 0);
>
> // Leave PWM0CCR as it is (no capture)
> // Leave PWM0LER as it is (no latch enable)
>
> // Enable PWM0[1]
> PWM0PCR |= (1 << 9);
>
> // Input frequency is 72 / 8 MHz = 9 MHz, we want to have 300 * 1000
> Hz, so the prescaler is set as follows:
> PWM0PR = 72000000 / 8 / 300 / 1000;
>
> // Reset after 1000 counts
> PWM0MR0 = 1000;
>
> // reset on match of PWM0MR0
> PWM0MCR |= (1 << 1);
>
> // Set duty cycle of 50%
> PWM0MR1 = PWM0MR0 / 2;
>
> // PWM Count Control Register
> PWM0CTCR = 0;
>
> // Counter Enable & PWM0 enable
> PWM0TCR = (1 << 0) | (1 << 3);
>
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )