- Posts: 19
Porting Deviation to F3/F4 MCU, new LCD, etc
- cody
-
- Offline
Less
More
18 Oct 2016 21:11 #55116
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Damn, I have the wrong display. It only has SPI. Will buy another one.
Thanks for the info!
Thanks for the info!
- victzh
-
- Offline
Less
More
- Posts: 1386
18 Oct 2016 21:54 #55118
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
ILI9325 has different initialization sequence - all the registers are different. After this sequence it should work similarly. The initialization data is in the fbtft Linux driver:
github.com/notro/fbtft/blob/master/fb_ili9325.c
The register interpretation is in datasheet cdn-shop.adafruit.com/datasheets/ILI9325.pdf
github.com/notro/fbtft/blob/master/fb_ili9325.c
The register interpretation is in datasheet cdn-shop.adafruit.com/datasheets/ILI9325.pdf
- HappyHarry
-
- Offline
Less
More
- Posts: 1136
19 Oct 2016 17:11 - 19 Oct 2016 17:12 #55161
by HappyHarry
Replied by HappyHarry on topic Porting Deviation to F3/F4 MCU, new LCD, etc
many thanks for the information victzh
i'll look into it and see if i can get it working
Last edit: 19 Oct 2016 17:12 by HappyHarry.
- victzh
-
- Offline
Less
More
- Posts: 1386
19 Oct 2016 20:50 #55169
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
I also found this:
www.ebay.com/itm/2-8-Inch-TFT-LCD-Module...een-LO-/162116186282
- victzh
-
- Offline
Less
More
- Posts: 1386
19 Oct 2016 20:54 #55170
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
And the UTFT library:
www.rinkydinkelectronics.com/library.php?id=51
- cody
-
- Offline
Less
More
- Posts: 19
21 Oct 2016 16:40 #55256
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Just to be sure before I buy.
This also looks ok, right?
eckstein-shop.de/24-Touchscreen-TFT-LCD-...1-Kompatibel-Arduino
It is hard to read but there are also 16 Data Pins.
This also looks ok, right?
eckstein-shop.de/24-Touchscreen-TFT-LCD-...1-Kompatibel-Arduino
It is hard to read but there are also 16 Data Pins.
- victzh
-
- Offline
Less
More
- Posts: 1386
21 Oct 2016 18:30 #55260
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Seems to be right display. Funny they publish the photo bottom up, probably for our exercise.
- anthony7288
-
- Offline
Less
More
- Posts: 51
22 Oct 2016 01:27 #55266
by anthony7288
hey Victzh
Can we use that display , do not need to change code ? right ?
it is compatible ?
Replied by anthony7288 on topic Porting Deviation to F3/F4 MCU, new LCD, etc
victzh wrote: Seems to be right display. Funny they publish the photo bottom up, probably for our exercise.
hey Victzh
Can we use that display , do not need to change code ? right ?
- cody
-
- Offline
Less
More
- Posts: 19
04 Nov 2016 23:20 #55695
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
So I got the ILI9431 display and a STM32F103VET6 board.
First I am trying to flash the devo8.elf to the board.
But it does not boot at all, it looks like the startup code is missing?
Do I need a bootloader and if so how do I flash it?
Or can I just set the right entry point address with the debugger?
On reset execution starts at 0x10100 which does not look right at all.
Or maybe my approach is totally wrong?
First I am trying to flash the devo8.elf to the board.
But it does not boot at all, it looks like the startup code is missing?
Do I need a bootloader and if so how do I flash it?
Or can I just set the right entry point address with the debugger?
On reset execution starts at 0x10100 which does not look right at all.
Or maybe my approach is totally wrong?
- victzh
-
- Offline
Less
More
- Posts: 1386
07 Nov 2016 21:48 #55781
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
I think you need a bootloader. Usually bootloader gets control first and if not instructed to upload firmware and some firmware is already installed it passes control to the firmware. So if you just flash the firmware, which is at 0x08004000 (Devo8 firmware is located at 0x08004000) there is no way it gets control properly.
You have bin files with bootloaders for every Devo at www.deviationtx.com/downloads-new/catego...nsmitter-bootloaders . You need to flash it at 0x08000000, the very beginning of flash ROM.
You have bin files with bootloaders for every Devo at www.deviationtx.com/downloads-new/catego...nsmitter-bootloaders . You need to flash it at 0x08000000, the very beginning of flash ROM.
- cody
-
- Offline
Less
More
- Posts: 19
07 Nov 2016 23:42 - 07 Nov 2016 23:55 #55786
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
So I flashed the bootloader but it does not start deviation. It keeps running at address 0x8002AB8.
Is there no source code for the bootloader?
Thanks for your help!
Edit:
I started deviation at the reset_handler function which looks right.
It then goes to powerdown after checking for the reset switch.
If I skip that it seems to reboot because of missing display I guess.
So I am on the right track now!
Is there no source code for the bootloader?
Thanks for your help!
Edit:
I started deviation at the reset_handler function which looks right.
It then goes to powerdown after checking for the reset switch.
If I skip that it seems to reboot because of missing display I guess.
So I am on the right track now!
Last edit: 07 Nov 2016 23:55 by cody.
- anthony7288
-
- Offline
Less
More
- Posts: 51
08 Nov 2016 13:42 - 08 Nov 2016 13:43 #55803
by anthony7288
Replied by anthony7288 on topic Porting Deviation to F3/F4 MCU, new LCD, etc
@ sadsack , help me
my Kit stm32 connect USB ok , can see DEVO 7e on DFU WK . but i OLED not yet work .
OLED - STM32
CS -- B0
SDIN-- A7
SD0-- A6
DC -- A5 .
RESET donot connect
i wrong somewhere ? I test OLED ok with arduino , Oled is good
my Kit stm32 connect USB ok , can see DEVO 7e on DFU WK . but i OLED not yet work .
OLED - STM32
CS -- B0
SDIN-- A7
SD0-- A6
DC -- A5 .
RESET donot connect
i wrong somewhere ? I test OLED ok with arduino , Oled is good
Last edit: 08 Nov 2016 13:43 by anthony7288.
- victzh
-
- Offline
Less
More
- Posts: 1386
08 Nov 2016 15:30 #55805
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
@cody, good to know! Keep us informed.
- SadSack
-
- Offline
Less
More
- Posts: 317
09 Nov 2016 11:11 #55818
by SadSack
Replied by SadSack on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Hi.
That's root I took using arduino. You need to be sure your deviation is running. You don't need to make any changes to code for oled to run. Once running then adjust.
Check code for connections. Don't rely on the wiki for the correct connections it may be wrong. Button matrix is wrong on wiki.
Connect everything ...
Button matrix
Flash
Oled
USB - if you hold enter on boot can check codes running.
Use bootloader.
I'll try and get to my eagle files.
That's root I took using arduino. You need to be sure your deviation is running. You don't need to make any changes to code for oled to run. Once running then adjust.
Check code for connections. Don't rely on the wiki for the correct connections it may be wrong. Button matrix is wrong on wiki.
Connect everything ...
Button matrix
Flash
Oled
USB - if you hold enter on boot can check codes running.
Use bootloader.
I'll try and get to my eagle files.
- anthony7288
-
- Offline
Less
More
- Posts: 51
10 Nov 2016 12:10 - 10 Nov 2016 12:12 #55834
by anthony7288
Replied by anthony7288 on topic Porting Deviation to F3/F4 MCU, new LCD, etc
thanks Sadsack . I used a Kit develop as below photo .
can you help me a diagram correct for Oled ? , i only guess diagram on WIKI and connect , i read source code but can not see clearly . I m not coder .
DFU Wakera detected devo 7e ., i also can loaded file DFU 5.0.
can you help me a diagram correct for Oled ? , i only guess diagram on WIKI and connect , i read source code but can not see clearly . I m not coder .
DFU Wakera detected devo 7e ., i also can loaded file DFU 5.0.
Last edit: 10 Nov 2016 12:12 by anthony7288.
- cody
-
- Offline
Less
More
- Posts: 19
12 Nov 2016 16:35 - 12 Nov 2016 19:37 #55874
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Looks like I was wrong. I think deviation crashes because the stack pointer is wrong(0x464C457C).
Does it rely on the bootloader to initialize the stack pointer?
Update: When manually setting the stack pointer I get to the point where disp_type is NULL because I have no display attached.
I think I have to connect those pins on the display:
VCC -> 3,3V
GND -> GND
DB[0-15] -> PD14, PD15, PD0, PD1, PE7, PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PD8, PD9, PD10
WR -> PD5
RD -> PD4
CS -> PD7
RS -> PD11??(alternate function FSMC_A16, dont know if that makes sense)
I am not sure for the RS pin, but it is the only one that is left.
Would be nice if anyone could comment, firs test did not work. disp_type is still NULL after Init().
Does it rely on the bootloader to initialize the stack pointer?
Update: When manually setting the stack pointer I get to the point where disp_type is NULL because I have no display attached.
I think I have to connect those pins on the display:
VCC -> 3,3V
GND -> GND
DB[0-15] -> PD14, PD15, PD0, PD1, PE7, PE8, PE9, PE10, PE11, PE12, PE13, PE14, PE15, PD8, PD9, PD10
WR -> PD5
RD -> PD4
CS -> PD7
RS -> PD11??(alternate function FSMC_A16, dont know if that makes sense)
I am not sure for the RS pin, but it is the only one that is left.
Would be nice if anyone could comment, firs test did not work. disp_type is still NULL after Init().
Last edit: 12 Nov 2016 19:37 by cody.
- anthony7288
-
- Offline
Less
More
- Posts: 51
26 Nov 2016 05:40 #56289
by anthony7288
Replied by anthony7288 on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Update work ? Cody ? Do you sucessfull ?
- cody
-
- Offline
Less
More
- Posts: 19
26 Nov 2016 15:22 #56301
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
No, LCD does not work. I dont know whats wrong.
- victzh
-
- Offline
Less
More
- Posts: 1386
27 Nov 2016 21:49 #56324
by victzh
Replied by victzh on topic Porting Deviation to F3/F4 MCU, new LCD, etc
@cody, RS to PD11 is correct. I used schematics from Radiolink AT10, we have it on Wiki. As they all use FSMC there is only one way to connect it. Can you see what display detection returns and can you make sure you linked in ILI9431 driver because orginally Devo 8 uses HX8347-D. It should be there, but just in case look at the map of your build.
- cody
-
- Offline
Less
More
- Posts: 19
27 Nov 2016 22:38 - 27 Nov 2016 22:47 #56325
by cody
Replied by cody on topic Porting Deviation to F3/F4 MCU, new LCD, etc
Are you sure there is no ILI9431 in Devo8 build?
I can see this in the map file:
.text.ili9341_init
0x08005558 0x17c objs/devo8/ili9341.o
0x08005558 ili9341_init
I dont think I modified anything there.
Edit: I did not connect PE0 to REST like on the AT10 schematic. Also the LED(backlight?) connection on PE9 is missing.
I will have one more try during this week.
Edit: display detection returns no display or NULL. I cant remember.
I can see this in the map file:
.text.ili9341_init
0x08005558 0x17c objs/devo8/ili9341.o
0x08005558 ili9341_init
I dont think I modified anything there.
Edit: I did not connect PE0 to REST like on the AT10 schematic. Also the LED(backlight?) connection on PE9 is missing.
I will have one more try during this week.
Edit: display detection returns no display or NULL. I cant remember.
Last edit: 27 Nov 2016 22:47 by cody.
Time to create page: 0.158 seconds
-
Home
-
Forum
-
Development
-
Development
- Porting Deviation to F3/F4 MCU, new LCD, etc