ivan_ucherdjiev post at 2015-6-10 06:03:49

UART1,2,3c

Hello guys,

I am working on a project in which i need to use uart. Can someone tell me how can i useuart 3 with python on Orange PI 2 .
Thank you!

Vladimir55 post at 2015-8-19 14:03:41

Hi!
I have Orange PI mini 2H3
tell me how to use UART ?
where lies sys_config.fex ?(raspbian)
Thank you!

ivan_ucherdjiev post at 2015-6-14 16:29:53

ah I solved this just they need to be enabled first in sys_config.fex file.

ivan_ucherdjiev post at 2015-8-19 16:27:16

Hello Vladimir,

In sys_config.fex file at line 250+ you should see this:

;----------------------------------------------------------------------------------
;uart configuration
;uart_type ---2 (2 wire), 4 (4 wire), 8 (8 wire, full function)
;----------------------------------------------------------------------------------

uart_used       = 1
uart_port       = 0
uart_type       = 2
uart_tx         = port:PA04<2><1><default><default>
uart_rx         = port:PA05<2><1><default><default>


uart_used       = 1
uart_port       = 1
uart_type       = 4
uart_tx         = port:PG06<2><1><default><default>
uart_rx         = port:PG07<2><1><default><default>
uart_rts      = port:PG08<2><1><default><default>
uart_cts      = port:PG09<2><1><default><default>


uart_used       = 0
uart_port       = 2
uart_type       = 4
uart_tx         = port:PA00<2><1><default><default>
uart_rx         = port:PA01<2><1><default><default>
uart_rts      = port:PA02<2><1><default><default>
uart_cts      = port:PA03<2><1><default><default>


uart_used       = 0
uart_port       = 3
uart_type       = 4
uart_tx         = port:PA13<3><1><default><default>
uart_rx         = port:PA14<3><1><default><default>
uart_rts      = port:PA15<3><1><default><default>
uart_cts      = port:PA16<3><1><default><default>

Here "uart_used" must be "uart_used = 1" this enable the UART. Then "uart_type = 4" show you the UART mode (if you use CTS and RTS signals you should use mode 4) for standart uart you dont need CTS and RTS so uart_mode must be " uart_mode = 2" , so the UART part in sys_config.fex should look like this:

;----------------------------------------------------------------------------------
;uart configuration
;uart_type ---2 (2 wire), 4 (4 wire), 8 (8 wire, full function)
;----------------------------------------------------------------------------------

uart_used       = 1
uart_port       = 0
uart_type       = 2
uart_tx         = port:PA04<2><1><default><default>
uart_rx         = port:PA05<2><1><default><default>


uart_used       = 1
uart_port       = 1
uart_type       = 2
uart_tx         = port:PG06<2><1><default><default>
uart_rx         = port:PG07<2><1><default><default>



uart_used       = 1
uart_port       = 2
uart_type       = 2
uart_tx         = port:PA02<2><1><default><default>
uart_rx         = port:PA01<2><1><default><default>




uart_used       = 1
uart_port       = 3
uart_type       = 2
uart_tx         = port:PA13<3><1><default><default>
uart_rx         = port:PA14<3><1><default><default>

I hope this will help you.

Best regards

.

Vladimir55 post at 2015-8-19 23:03:23

ivan_ucherdjiev replied at 2015-8-19 16:27
Hello Vladimir,

In sys_config.fex file at line 250+ you should see this:


thanks for the answer !
I can not find the file sys_config.fex!:(
I can not find the file config.txt!http://www.orangepi.org/orangepibbsen/static/image/smiley/default/sad.gif
(Raspbian_For_OrangePi2_mini2_v0_8_0)
help...:)

ivan_ucherdjiev post at 2015-8-20 15:43:07

Hello Vladimir55
1.You should download the linux sorce for opi2 (the sys_config.fex is in this zip).
2.Then you follow this guilde      http://linux-sunxi.org/H3_Manual_build_howto
Which show you how to rebuild your u-boot .
3. Before you build the u-boot you should first make the changes in the sys_config.fex.
4. After rebuilding the u-boot you put it on the sd-card (only the u-boot) and thats it.

In the guide is explaned how to rebuild your you-boot and what you need to do so.

If you have any other questions fill free to ask ;)

Best regards

Vladimir55 post at 2015-8-31 16:13:15

Edited by Vladimir55 at 2015-8-31 16:35

ivan_ucherdjiev replied at 2015-8-20 15:43
Hello Vladimir55
1.You should download the linux sorce for opi2 (the sys_config.fex is in this zip). ...
Hi!
I bought Orange PI in hopes of compatibility for raspberry pi.
(not compatible - deception)
I'm not an expert on building a custom kernel.
There is no possibility other solutions to manage
UART 1-3, USBtoCOM, SPI, i2c, PWM, intrrupt GPIO, intrrupt Time ?
I understand support from the manufacturer will not be just.
if it is true...
then easier to buy raspberi pi2, it all works out of the box.
and forget about Orange PI to operate the equipment.
Thank you.


ivan_ucherdjiev post at 2015-9-1 17:17:07

Hello Vladimir55,

I can build the u_boot with working UARTS for you and send you the BIN file of it . All that you going to need is to put it on the right place in your SDcard. :)
Uarts and gpios are working, also I think SPI and I2C are working too but I didnt try them yet for the other peripheral I do not know because i didnt test it, but i am sure that someone will make it work if it is not already done.
For Orange Pi a lot more should be done, so you have 2 options join the community and help to make thinks work or just buy raspberry pi. It depends on what you want to do... For me I prefer working with Orange Pi but it's connected with a lot of reading about linux kernel.... If you wish to try to do kernel programing and continue to work with Orange PI I can send you some books which will help you...

Best regards.

alexshi post at 2015-10-2 15:22:59

Edited by alexshi at 2015-10-2 16:06

Hi all!
If youdo it:(ORANGEPI PC    Ubuntu)
su
modprobe gpio-sunxi
then   GPIO work OK

but

UART1not work :(

Why?





ivan_ucherdjiev post at 2015-10-9 21:46:28

Hi mate,

Check do you have ttyS1! If you dont have ttyS1, then its probably, because you need to enable the UART . To enable the uart, you have to rebuild your u-boot.

Best regards
page: [1] 2
View full version: UART1,2,3c