Go to advanced search

by KyluAce
Wed Jun 19, 2019 8:33 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Maximum Baudrate of UART in Raspberry Pi 3
Replies: 15
Views: 13308

Re: Maximum Baudrate of UART in Raspberry Pi 3

You will learn more if you try communicating between two devices at such a high baud rate. The problems will soon become apparent. There was a lot of problems but it can be done. I know that it took a lot of time but I created comunnication beetwen RPi and other side devices (parallel connection) u...
by KyluAce
Fri Jun 14, 2019 11:56 am
Forum: Python
Topic: Touch doesn't work xpt2046 + ili9341 RPi3 Strecht Python
Replies: 2
Views: 189

Re: Touch doesn't work xpt2046 + ili9341 RPi3 Strecht Python

I made little change. Change CS pins to OUT not ALT4. Now there is no signal on both when I asking about touch positions but still touch doesn't work.
by KyluAce
Fri Jun 14, 2019 11:41 am
Forum: Python
Topic: Touch doesn't work xpt2046 + ili9341 RPi3 Strecht Python
Replies: 2
Views: 189

Touch doesn't work xpt2046 + ili9341 RPi3 Strecht Python

OS version PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" I bought 2.4 TPT SPI 320x240 display for my RPi 3. I connect whole display to SPI1. Firstly ofc I enable spi1 on boot/cmdline.txt change mode for pins on alternatives etc and displa...
by KyluAce
Mon Sep 10, 2018 8:01 am
Forum: Python
Topic: Timeout for radio read pynrf24 lib
Replies: 2
Views: 403

Re: Timeout for radio read pynrf24 lib

up
by KyluAce
Wed Sep 05, 2018 8:28 am
Forum: Python
Topic: Timeout for radio read pynrf24 lib
Replies: 2
Views: 403

Timeout for radio read pynrf24 lib

Hello everyone. I'm using pynrf24 lib https://github.com/jpbarraca/pynrf24 . I need to say that all it works like charms but I found one case with strange behaviour. I have wroted simple code for receive frames looks like this : def recv(): radio.openWritingPipe(pipes[0]) radio.openReadingPipe(1, pi...
by KyluAce
Fri Aug 10, 2018 12:46 pm
Forum: Troubleshooting
Topic: Service won't run python srcipt with sudo
Replies: 10
Views: 476

Re: Service won't run python srcipt with sudo

The point is that script is a server which works all the time. And it works if I run it from command line like "sudo python3 send.py" but when I use this script it is started and finished in the blink of an eye Then it's a fault in your code. The script seems to catch the error and then exit withou...
by KyluAce
Fri Aug 10, 2018 12:31 pm
Forum: Troubleshooting
Topic: Service won't run python srcipt with sudo
Replies: 10
Views: 476

Re: Service won't run python srcipt with sudo

Process: 1306 ExecStart=/usr/bin/python3 -u send.py (code=exited, status=0/SUCCESS) Your script started and finished without errors. That's it... If you expect something else then you have to post your code and tell us what the script should do. The point is that script is a server which works all ...
by KyluAce
Fri Aug 10, 2018 10:41 am
Forum: Troubleshooting
Topic: Service won't run python srcipt with sudo
Replies: 10
Views: 476

Re: Service won't run python srcipt with sudo

systemctl status gives ● serviceSend.service - sendService Loaded: loaded (/etc/systemd/system/serviceSend.service; enabled; vendor preset: enabled) Active: inactive (dead) since Fri 2018-08-10 10:36:43 UTC; 3min 35s ago Process: 1306 ExecStart=/usr/bin/python3 -u send.py (code=exited, status=0/SUCC...
by KyluAce
Fri Aug 10, 2018 8:20 am
Forum: Troubleshooting
Topic: Service won't run python srcipt with sudo
Replies: 10
Views: 476

Service won't run python srcipt with sudo

Hello, I have python script that getting access to "/dev/mem". To made it work I need to run this script with "sudo" privleges and everything is work like charm. Now I create service that run this script at boot. I used for this, this instructions https://www.raspberrypi.org/documentation/linux/usag...
by KyluAce
Mon Jul 30, 2018 6:11 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Re: Interrupted communication via serial (split package)

On Rpi3 there are some problems with bluetooth etc that's why i switch and use AMA0, and sa I know there is no other good option to use serial I did not ask *why* you switched, but how. hat settings did yo change, etc. See my previous posts. Don't expect more responses from me, though. ATM I have n...
by KyluAce
Fri Jul 27, 2018 9:24 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Re: Interrupted communication via serial (split package)

Sample simplified code def send_uart(): path = "/home/pi/Downloads/target/ timer_value = struct.unpack_from("Q", stBase, TIMER_OFFSET)[0] <- get timer testValue = timer_value + 20000 <- set timer for 20ms with open(path, "rb") as fh: chunk = fh.read(5120) while True: if timer_value >= testValue: ser...
by KyluAce
Fri Jul 27, 2018 9:18 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Re: Interrupted communication via serial (split package)

The receiver should be designed to cope with slight transmission delays. I suspect that in this instance the transmitter program is doing a byte by byte transfer. If that is the case then that is an additional problem. Ofc that I can deal with delay but I don't know how long it will be. Now it can ...
by KyluAce
Fri Jul 27, 2018 9:17 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Re: Interrupted communication via serial (split package)

Rpi version : RPi3 Programming language : Python Used lib : Pyserial OS version : Raspbian Stretch Lite (June 2018) port :'/dev/ttyAMA0' That can't be all because ttyAMA0 is not available by default on a Pi3. What did you change in the configuration? You need to give more information, including som...
by KyluAce
Fri Jul 27, 2018 9:14 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Re: Interrupted communication via serial (split package)

Image
https://ibb.co/eAyFG8

This is how it looks this part should be together but something split it. Question is what do it and why
by KyluAce
Fri Jul 27, 2018 9:07 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Re: Interrupted communication via serial (split package)

Rpi version : RPi3
Programming language : Python
Used lib : Pyserial
OS version : Raspbian Stretch Lite (June 2018) system run on 10 class card
port :'/dev/ttyAMA0'
by KyluAce
Fri Jul 27, 2018 8:34 am
Forum: Troubleshooting
Topic: Interrupted communication via serial (split package)
Replies: 11
Views: 460

Interrupted communication via serial (split package)

Hello everyone. I wrote communication via serial port on my RPi3 in python. Everything seems to be working but I noticed strange behaviour that occure from time to time. At first I need to say that all this communication works in specific time line. I have package of 5120 byte size each. Let's assum...
by KyluAce
Mon Apr 16, 2018 7:52 am
Forum: HATs and other add-ons
Topic: NRF24L01+ in Python
Replies: 30
Views: 41334

Re: NRF24L01+ in Python

Hello, I'm working with NRF24L01 + python and I'm confused about reading data. I have simple function to read data for 20 seconds. There is no problem if I get some data but if there is no radio signals my program stuck on "radio.read(revc_buffer)" till it gets data. There is an option to fight this...
by KyluAce
Thu Jan 04, 2018 9:17 am
Forum: Python
Topic: Reserve one of RPi3 cores for python script.
Replies: 11
Views: 1666

Re: Reserve one of RPi3 cores for python script.

The point is that my program do some tasks in specific time line. It have to be accurate to 0.1ms or even more. I noticed that from time to time when my program is running it switches core and start using another one (Probably some system(kernel) processes start using same core and with combination ...
by KyluAce
Wed Jan 03, 2018 1:41 pm
Forum: Python
Topic: Reserve one of RPi3 cores for python script.
Replies: 11
Views: 1666

Re: Reserve one of RPi3 cores for python script.

It won't make a difference, because your script gives up control to the Linux kernel whenever it waits or does I/O. At that context switch the unit-of-work can be redispatched on any of the four engines. That's how your Raspberry Pi appears to be doing more than four things at once. CPU affinity sh...
by KyluAce
Thu Dec 28, 2017 12:11 pm
Forum: Python
Topic: Reserve one of RPi3 cores for python script.
Replies: 11
Views: 1666

Reserve one of RPi3 cores for python script.

Hello guys I noticed strange behaviour. I run python script on my RPi3 and I was monitoring all this process using HTOP. I noticed that from time to time my script switch cores and use different one. I'm worried that this behaviour gives me a lot of trouble with my script. There is an option to use ...
by KyluAce
Wed Nov 29, 2017 9:32 am
Forum: Python
Topic: RPi lose bytes after first chunk (after changing RX/TX line)
Replies: 2
Views: 405

Re: RPi lose first byte of chunk (changing RX/TX line)

Post your full circuit and perhaps the full program of both ends. If it's complicated; simplify that to a smaller test case which illustrates the problem. Are you actually missing the first byte or is it corrupted ? Is it actually missing or just not showing when you use print ? I put same problem ...
by KyluAce
Fri Nov 24, 2017 10:42 am
Forum: Python
Topic: RPi lose bytes after first chunk (after changing RX/TX line)
Replies: 2
Views: 405

RPi lose bytes after first chunk (after changing RX/TX line)

Hello I have simple UART communication beetwen 2 devices. One of them (Reading side) is Raspebrry pi 3. Code is really simple : ser = serial.Serial( port='/dev/ttyAMA0', baudrate=115200 ) def read(): while True: if timer_value >= test_timer data = ser.read(5120) print(data) test_timer = test_timer +...
by KyluAce
Fri Nov 17, 2017 8:35 am
Forum: Python
Topic: Lose bytes/reading unexpecting bytes, while reading from serial port
Replies: 1
Views: 373

Re: Lose bytes/reading unexpecting bytes, while reading from serial port

Ok i figured out what's going on, RPi loses data only when I send bytes using DMA if I normally send data everything is good. Any one now how to do it working with sending via DMA ?
by KyluAce
Wed Nov 15, 2017 1:00 pm
Forum: Python
Topic: Lose bytes/reading unexpecting bytes, while reading from serial port
Replies: 1
Views: 373

Lose bytes/reading unexpecting bytes, while reading from serial port

Hello mates, from few days i'm trying to fight this strange problem. I'm reading some bytes from serial port. Almoust always I'm loosing some (always the same) bytes and sometimes I'm read bytes which I don't send. On sending side I have simple frame which looks like : startFrame = [0x01, 0x02, 0x03...

Go to advanced search