Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2477

General discussion • [RPI4] disable bluetooth affected I2C communication

$
0
0
Hi Folks,

I build a custom Pi HAT that contains sensors and modules. The sensors are communicating with RPI4 via I2C and UART. I am using Bookworm 64 bit OS.

My issue begins when I started using serial0 (RXD0 ) and serial4 (TXD4, RXD4). I noticed glitches in serial0 RXD0. The values jumps periodically.

I searched the internet and some pages refer that Bluetooth is the root-cause and they recommended to disable it. I disabled it with this configuration "dtoverlay=disable-bt". please check check end of the file for all my communication peripherals configuration

Code:

pi@pi:~ $ sudo cat /boot/firmware/config.txt# For more options and information see# http://rptl.io/configtxt# Some settings may impact device functionality. See link above for details# Uncomment some or all of these to enable the optional hardware interfaces#dtparam=i2c_arm=on#dtparam=i2s=on#dtparam=spi=on# Enable audio (loads snd_bcm2835)dtparam=audio=on# Additional overlays and parameters are documented# /boot/firmware/overlays/README# Automatically load overlays for detected camerascamera_auto_detect=1# Automatically load overlays for detected DSI displaysdisplay_auto_detect=1# Automatically load initramfs files, if foundauto_initramfs=1# Enable DRM VC4 V3D driverdtoverlay=vc4-kms-v3dmax_framebuffers=2# Don't have the firmware create an initial video= setting in cmdline.txt.# Use the kernel's default instead.disable_fw_kms_setup=1# Run in 64-bit modearm_64bit=1# Disable compensation for displays with overscandisable_overscan=1# Run as fast as firmware / board allowsarm_boost=1[cm4]# Enable host mode on the 2711 built-in XHCI USB controller.# This line should be removed if the legacy DWC2 controller is required# (e.g. for USB device mode) or if USB support is not required.otg_mode=1[cm5]dtoverlay=dwc2,dr_mode=host[all]dtparam=i2c_arm=ondtparam=i2c_arm_baudrate=400000dtparam=spi=onenable_uart=1dtoverlay=uart4dtoverlay=disable-bt

I found that the Serial0 glitches are not happening anymore but I noticed the I2C communication stopped working correctly :!: . That was not expected.

The I2C is connected to PC9685 module, SSD1306 display, IMU. My application that access the sensors is running as linux service and it is written in C/C++. The issue is observed with PC9685 module.

when I trigger "i2cdetect" or "i2get" they respond back correctly but the PC9685 module doesn't trigger any motors to rotate.

when I removed "dtoverlay=disable-bt', everything starts to work normally but I still got the old Serial0 glitches. :oops:

I appreciate your support

Statistics: Posted by akhodeir — Wed Mar 26, 2025 12:41 pm



Viewing all articles
Browse latest Browse all 2477

Trending Articles