Pira.cz Technical Forum
Radio Data System (RDS) => P132, P164, P232(U) and P332 RDS Encoders => Topic started by: suricato on January 07, 2026, 03:16:01 pm
-
Hi, i'm using p232 chip by raspberry cm4, i'm using /dev/ttyAMA1 serial, the test code is for example:
import serial
import time
ser = serial.Serial(
"/dev/ttyAMA1",
baudrate=19200,
timeout=2
)
# Attendi che il P232 sia pronto (15 secondi da power-up)
print("Aspetto la risposta iniziale dal P232...")
time.sleep(15)
data = ser.read(64)
print("Inizializzazione:", data)
# Manda un comando valido (dipende dal firmware)
ser.write(b'LEVEL\n')
time.sleep(0.5)
response = ser.read(128)
print("Risposta:", response)
ser.close()
no reply from p232 chip,attached there is the board schematic, the raspberry cm4 uart are DSP_UART0_RDS_TX, and DSP_UART0_RDS_RX
the p232 chip doesn't work, i don't understand that
-
The p232 mcu integration is seamless. Unfortunately, you probably skipped the LED indicators in your circuit so you made the diagnostics unnecessarily complicated. With the LED indicators, determining the operating status is immediate.
Thus you need some diagnostic tools to verify that the chip is wired well and operating. For example you may measure the DA7 digital output frequency (57 kHz). Or you may attach logic analyzer to TX1, it sends firmware version on power-up. Or you may connect RDS decoder to the analogue output. Or you may connect I2C analyzer to the I2C bus, there's lively communication after power-up.
Once you verify anything of the above, we may continue.
-
Hi,
My problem is above all because the chip does not respond to the message sent via the uart connected to RX2,TX2
-
Hi,
my doubt is whether the fact that the p232 chip is powered by 5v and the raspberry pi cm4 by 3.3v could create problems
-
Please see parameters VIL and VIH in the device pdf.
If you use 5V power supply for the chip, at least a simple voltage level converter is required for 3V3 RX line:
VL = 3V3, VH = 5V
Also, I have doubt about the command ser.write(b'LEVEL\n') in your script. \n is usually equivalent to 0x0A, in Python too. In such case you must use \r which is a correct carriage-return character (0x0D). See the P232 RDS Encoder Technical Manual for detailed info about the ASCII communication format.
-
Hi,
i agree,thank you very much,i will try