/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Primer2 CAN-bus and FSMC lcd driver problem

Username:     
Password:     
             

Forum

# 26   2009-08-05 08:22:01 Primer2 CAN-bus and FSMC lcd driver problem

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

For your information, we met the same problem with the I2C1 pins shared with FSMC.
There after, you can see a the solution used to switch on/off the FSMC.

http://www.stm32circle.com/forum/viewto … 3543#p3543

Offline

 

# 27   2009-09-01 14:41:35 Primer2 CAN-bus and FSMC lcd driver problem

fredtim
New member
Registered: 2009-08-31
Posts: 1

Re: Primer2 CAN-bus and FSMC lcd driver problem

I Francis,

I'm very  interested by the lcd.c file.
Could you please send it to me at this address: frederic.timbert@autoliv.com

Thanks a lot.
Fred

Offline

 

# 28   2009-09-02 07:38:16 Primer2 CAN-bus and FSMC lcd driver problem

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Primer2 CAN-bus and FSMC lcd driver problem

done

Offline

 

# 29   2009-09-17 07:07:06 Primer2 CAN-bus and FSMC lcd driver problem

ariffehsan
New member
From: malaysia
Registered: 2009-09-10
Posts: 6
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

Hi Francis,

I'm also interested with your lcd.c.
Could you please send it to me?

Thanks.

Offline

 

# 30   2009-09-17 08:13:34 Primer2 CAN-bus and FSMC lcd driver problem

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: Primer2 CAN-bus and FSMC lcd driver problem

I'm likewise interested.

Last edited by kubark42 (2009-09-17 18:43:57)

Offline

 

# 31   2009-09-17 14:33:41 Primer2 CAN-bus and FSMC lcd driver problem

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Primer2 CAN-bus and FSMC lcd driver problem

ok... we will put this file somewhere on the ftp, then we will post the URL.

Offline

 

# 32   2009-09-17 14:51:29 Primer2 CAN-bus and FSMC lcd driver problem

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

Done.

FTP link : "ftp://www.raisonance.com/pub/CircleOS/lcd_without_fsmc.c"

You need to define the macro "P2C_107".

Offline

 

# 33   2009-09-17 18:45:15 Primer2 CAN-bus and FSMC lcd driver problem

kubark42
Member
Registered: 2009-02-13
Posts: 46

Re: Primer2 CAN-bus and FSMC lcd driver problem

Thanks a lot, yrt!

P.S. You might update the copyright date on it, for ease of comparison years down the road when people's memories aren't so fresh.

Offline

 

# 34   2009-09-18 22:25:39 Primer2 CAN-bus and FSMC lcd driver problem

ariffehsan
New member
From: malaysia
Registered: 2009-09-10
Posts: 6
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

Thanks yrt. I'm really stuck with lcd-fcms..

Offline

 

# 35   2009-10-24 09:22:25 Primer2 CAN-bus and FSMC lcd driver problem

ariffehsan
New member
From: malaysia
Registered: 2009-09-10
Posts: 6
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

Hi Francis,

I need your help. I tried to read a register of ST7732 as the following code snippet:

LCD_SendLCDCmd( ST7732_MADCTR );
LCD_SendLCDData( V12_MADCTRVAL );
   
LCD_SendLCDCmd( ST7732_RDDMADCTR );
u32 t = LCD_ReadLCDData();

but i couldn't get the same value that have been written on.
can you help me..

Offline

 

# 36   2009-10-26 08:46:45 Primer2 CAN-bus and FSMC lcd driver problem

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

When you want to read data on the LCD controler after a new command, you always must repeat the first LCD_ReadLCDData(), because the first read byte returned by the controller is always dummy.

Write your code as followed :
LCD_SendLCDCmd( ST7732_RDDMADCTR );
u32 t = LCD_ReadLCDData();   // dummy byte
      t = LCD_ReadLCDData();   // real value

Offline

 

# 37   2009-11-18 15:04:18 Primer2 CAN-bus and FSMC lcd driver problem

mdce
Member
Registered: 2009-09-25
Posts: 25

Re: Primer2 CAN-bus and FSMC lcd driver problem

lcd_without_fsmc.c do'nt works with CircleOS v3.8
Do anyone has modified lcd.c from CircleOS v3.8 ?

Last edited by mdce (2009-11-18 15:04:54)

Offline

 

# 38   2009-11-19 17:15:49 Primer2 CAN-bus and FSMC lcd driver problem

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Primer2 CAN-bus and FSMC lcd driver problem

Regarding CAN versus FSMC: you can either use "lcd_without_fsmc.c", or disabling the FSMC clock when you are running a program that communicates through the CAN. Perhaps the second possibility would be easier (no need to adapt CircleOS), but it means that you can't display anything new on the LCD during a CAN communication.

Offline

 

# 39   2009-11-27 21:10:39 Primer2 CAN-bus and FSMC lcd driver problem

adderd
New member
From: Earth
Registered: 2009-11-20
Posts: 8

Re: Primer2 CAN-bus and FSMC lcd driver problem

Francis :

Regarding CAN versus FSMC: you can either use "lcd_without_fsmc.c", or disabling the FSMC clock when you are running a program that communicates through the CAN. Perhaps the second possibility would be easier (no need to adapt CircleOS), but it means that you can't display anything new on the LCD during a CAN communication.

I've tried to adapt the lcd_without_fsmc.c file to work with Circle 3.8 without luck so far... It compiles but when the device reboots there is nothing but a blank white screen. It still gives me the audio on startup and it still beeps and stuff as I move the device around but no video. Also, the middle two LEDs (of the four on the end) tend to flash and/or stay on depending on what I do as a play with it. Not sure why it won't work, I'm sure I didn't make a mistake in merging the current lcd and the without_fsmc one... Maybe something else changed with the way everything is initialized.

So, I guess I've struck out on the above approach unless someone else has a guess... If I disable fsmc until I need to update the LCD will there be a potential of a fault condition where the CAN bus will get messages and loose them while I'm writing to the LCD? What happens if there are can messages while FSMC is on for a short time?

Offline

 

# 40   2009-11-27 22:20:54 Primer2 CAN-bus and FSMC lcd driver problem

adderd
New member
From: Earth
Registered: 2009-11-20
Posts: 8

Re: Primer2 CAN-bus and FSMC lcd driver problem

Agggh.... Stuck my foot in my mouth. I DID make a mistake in merging things over. I've got the LCD sort of working without FSMC on Circle 3.8 right now. There's an issue with the cursor not updating the screen it's going over as it moves (paints everything black) but other than that things seem good. Once I get this figured out could the no fsmc code please be merged into the main branch so that this doesn't happen again on the next circleos version?

Oh, merging the non fsmc code into circleos made it go over the 24k boundary by 92 bytes. I had to move a couple more functions out of the debuggable range to compile. Maybe something official should be done here too.

Offline

 

# 41   2009-11-28 07:32:27 Primer2 CAN-bus and FSMC lcd driver problem

mdce
Member
Registered: 2009-09-25
Posts: 25

Re: Primer2 CAN-bus and FSMC lcd driver problem

I had many problems with LCD and CAN.
I finally wrapped the CAN on PA11 and PA12 (I do'nt need USB).

Offline

 

# 42   2009-11-28 18:12:10 Primer2 CAN-bus and FSMC lcd driver problem

1050356
New member
From: Porto
Registered: 2009-07-16
Posts: 5
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

I have problems in prime 1 when i try send a message by can bus...
I make all configurations for can bus and then try to send the message but it stay pending....
In my application i´m using the LCD too. Anyone have a idea....?
Sorry my english:(
Best regards
Dario

Offline

 

# 43   2009-11-29 00:45:12 Primer2 CAN-bus and FSMC lcd driver problem

1050356
New member
From: Porto
Registered: 2009-07-16
Posts: 5
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

I don´t use lcd anymore but i can´t transmit CAN messages...i don´t know at is going on.... all messages stil pending....anyone can help me?
thanks

Offline

 

# 44   2009-11-29 02:10:55 Primer2 CAN-bus and FSMC lcd driver problem

adderd
New member
From: Earth
Registered: 2009-11-20
Posts: 8

Re: Primer2 CAN-bus and FSMC lcd driver problem

1050356 :

I don´t use lcd anymore but i can´t transmit CAN messages...i don´t know at is going on.... all messages stil pending....anyone can help me?
thanks

Did you purchase a MAX3051 chip and solder it on where the documentation says you need to? Because if you did not then you don't really have a canbus connection. The documentation isn't clear on which orientation you should solder the chip in. But, if I remember correctly the proper way is with pin 1 in the bottom left (while looking at the picture)

Offline

 

# 45   2009-11-29 19:02:31 Primer2 CAN-bus and FSMC lcd driver problem

1050356
New member
From: Porto
Registered: 2009-07-16
Posts: 5
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

I have all the components that i need, but now i can transmit a message only in loopback mode, when i try to send a message in normal mode the transmission fails.... can you help me?
One more question.... How the mask´s from acceptance filters are contructed?
thanks
1050356

Offline

 

# 46   2009-11-30 11:37:41 Primer2 CAN-bus and FSMC lcd driver problem

1050356
New member
From: Porto
Registered: 2009-07-16
Posts: 5
Website

Re: Primer2 CAN-bus and FSMC lcd driver problem

I already solve the problem of transmition. The problem was ralated with FSMC.
Right now, i have another problem....lol
I configurate CAN_IT for FMP0, and at any time the interruption is gerated... what can causes this? Or the message can´t pass the filter or the interruption configuration has problems....
Thank you for all attention
best regards
1050356

Offline

 

# 47   2009-12-11 00:32:13 Primer2 CAN-bus and FSMC lcd driver problem

adderd
New member
From: Earth
Registered: 2009-11-20
Posts: 8

Re: Primer2 CAN-bus and FSMC lcd driver problem

1050356 :

I already solve the problem of transmition. The problem was ralated with FSMC.
Right now, i have another problem....lol
I configurate CAN_IT for FMP0, and at any time the interruption is gerated... what can causes this? Or the message can´t pass the filter or the interruption configuration has problems....
Thank you for all attention
best regards
1050356

I wish I knew... The fact is, I'm just now getting into CAN. Today I fixed up the lingering problems I had with the FSMC-less lcd code. I'm just about to start testing my primer 2 on a canbus to see if I can get things working.

Maybe it'd be easier to figure out what's going on for you if you posted some source code. At the least your initialization code would be good to see.

Offline

 

# 48   2010-02-02 08:06:44 Primer2 CAN-bus and FSMC lcd driver problem

Matthias
Member
From: Germany
Registered: 2010-01-30
Posts: 20

Re: Primer2 CAN-bus and FSMC lcd driver problem

Hat mir jemand ein Projekt in dem
+CAN lesen und senden
+Ausgabe auf LCD?
OHNE Circle OS geht.

Danke.
------------
Does anyone else have my project in the
+ CAN read and send
+ Output to LCD?
Circle goes WITHOUT OS.

Thank you.


Wer Rechtschreibfehler findet, darf sie behalten
english by translate.google.com
Whoever finds typos may keep them

Offline

 

Board footer