Porting Deviation to F3/F4 MCU, new LCD, etc

More
18 Oct 2016 21:11 #55116 by cody
Damn, I have the wrong display. It only has SPI. Will buy another one.
Thanks for the info!

Please Log in or Create an account to join the conversation.

More
18 Oct 2016 21:54 #55118 by victzh
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

Please Log in or Create an account to join the conversation.

More
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 8) i'll look into it and see if i can get it working :)
Last edit: 19 Oct 2016 17:12 by HappyHarry.

Please Log in or Create an account to join the conversation.

More
19 Oct 2016 20:50 #55169 by victzh

Please Log in or Create an account to join the conversation.

More
19 Oct 2016 20:54 #55170 by victzh

Please Log in or Create an account to join the conversation.

More
21 Oct 2016 16:40 #55256 by cody
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.

Please Log in or Create an account to join the conversation.

More
21 Oct 2016 18:30 #55260 by victzh
Seems to be right display. Funny they publish the photo bottom up, probably for our exercise. :-)

Please Log in or Create an account to join the conversation.

More
22 Oct 2016 01:27 #55266 by anthony7288
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 ?:) it is compatible ?

Please Log in or Create an account to join the conversation.

More
04 Nov 2016 23:20 #55695 by cody
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?

Please Log in or Create an account to join the conversation.

More
07 Nov 2016 21:48 #55781 by victzh
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.

Please Log in or Create an account to join the conversation.

More
07 Nov 2016 23:42 - 07 Nov 2016 23:55 #55786 by cody
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!
Last edit: 07 Nov 2016 23:55 by cody.

Please Log in or Create an account to join the conversation.

More
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
Last edit: 08 Nov 2016 13:43 by anthony7288.

Please Log in or Create an account to join the conversation.

More
08 Nov 2016 15:30 #55805 by victzh
@cody, good to know! Keep us informed.

Please Log in or Create an account to join the conversation.

More
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.

Please Log in or Create an account to join the conversation.

More
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.
Attachments:
Last edit: 10 Nov 2016 12:12 by anthony7288.

Please Log in or Create an account to join the conversation.

More
12 Nov 2016 16:35 - 12 Nov 2016 19:37 #55874 by cody
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().
Last edit: 12 Nov 2016 19:37 by cody.

Please Log in or Create an account to join the conversation.

More
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 ?

Please Log in or Create an account to join the conversation.

More
26 Nov 2016 15:22 #56301 by cody
No, LCD does not work. I dont know whats wrong.

Please Log in or Create an account to join the conversation.

More
27 Nov 2016 21:49 #56324 by victzh
@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.

Please Log in or Create an account to join the conversation.

More
27 Nov 2016 22:38 - 27 Nov 2016 22:47 #56325 by cody
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.
Last edit: 27 Nov 2016 22:47 by cody.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum