smlcd Interrupt

TonyD

New member
Hi Alex
I have found all the cards produced by sequent to be of high standards & function as expected.

I am wondering if you can help me. I have the SMLCD card & everything is working fine writing to LCD & polling buttons & encoder etc.
i am trying to stream line my Python script & instead of polling the buttons & encoder to see if encoder has changed or a button is pressed i am trying to use the Interrupt line GPIO26 40 pin connector #37. The schematics of all sequent Cards including the SMLCD card show a connection from J1 pin37 GPIO26 to your STM32 & on most cards a button is shown off this line & when pressed pulls this line to Ground.
I have written a simple python script that when the button connected to GPIO26 is pressed it prints to the screen pressed. This script is using the interrupt callback features of python "import gpiozero Button" as gpiozero is common between RPi3, 4, RPi5 & in my case iam using 64bit on RPi5.
My Problem is that none of the buttons or the Rotary encoder appear to generate an interrupt on GPIO26.

Would it be possible to modify the firmware loaded into the STM32 chip on the SMLCD card to generate an interrupt on GPIO26. that way i can do away with the polling routine & then check the Buttons & or the Encoder when an interrupt arrives via GPIO26

I have included a copy of the test script

SMLD Firmware Version
pi@Rpi-BatteryRm:~ $ smlcd -v
smlcd v1.0.0 Copyright (c) 2016 - 2023 Sequent Microsystems

pi@Rpi-BatteryRm:~ $ smlcd board
Firmware ver 02.00,


I await your earliest reply
& I Thank you in advance for your assistance as i know you are an extremely busy person
Regards Tony Doust
 

Attachments

  • interrupt.txt
    2.9 KB · Views: 1
Last edited:

alexburcea

Moderator
Staff member
Yes, the firmware can be modified for that. This was the initial plan, to interrupt Raspberry in case of any input changes, but never had the chance to do it.
 

TonyD

New member
Thanks for the reply
Is possible to have the firmware updated & estimated time frame for availability
ps. i am running on RPi5 64bit & python script.

Regards Tony
 

alexburcea

Moderator
Staff member
Hi give me a few days and I start working on it, I need to finish something urgent. I will make the interrupt enable settings to be saved in Flash so you can enable it from the command line and it stays enabled even after the power cycle. I will give you more details when is done.

Alex.
 

alexburcea

Moderator
Staff member
Hi Tony,

I just looked into it and realized the firmware already does the interrupt thing.
Please check your firmware version by running "smlcd -board" command, if is 2.0 you are good to go (monitor pin 37) if not go to the "smlcd-rpi/update/" folder and run "./update" but make sure no one access the I2C port during the update.

Alex.
 

TonyD

New member
Hi Alex
Have checked the Firmware & is Ver 2

pi@Rpi-BatteryRm:~ $ smlcd board
Firmware ver 02.00,

1) just confirming on a side note the command line -v is that the version number of the command line software

I have checked the interrupt from RPi pin 37 & is not functioning
I will have to pull the stack out of the live system & check if any of the other sequent cards are holing pin 37 either high or low
Will let U know later this weekend & let U know of my success or failure

Thank you for the excellent service & fast response to my queries
Regards Tony
 
Last edited:

TonyD

New member
Hi Alex
Further to Interrupt problem from SMLCD board
Found the Following

1) The SMLCD does generate an Interrupt however you have Initialise the LCD screen & after all initialising then call the button Interrupt read function which releases the interrupt line then the next interrupt will function correctly Needs further testing from python

Very little Documentation for Python Usage is downloaded from Git when installing the SMLCD card drivers from git.
If the contents of this git "https://github.com/SequentMicrosystems/wdt-rpi/tree/master/python" location was combined in a Python Usage documentation pdf would be very helpful. Also expanding on the explanation of the functions for Interrupt from the WDT Card

Also clarify in the WDT documentation that wdt SW1 does not generate an interrupt on RPI connectors & that this Switch SW1 has nothing to do with the interrupt or does it.
No Documentation that i have read both on you website & on GIT explains how to use the interrupt from the WDT card more importunately how to disable it so in doesn't hog the interrupt line to RPi pin 37 GPIO36
The only thing i found was in the Readme.md

2) WDT Watchdog Card is holding the Interrupt & preventing other cards from generating an interrupt. Trien command line wdt -bint 0 Disable Interrupt, wdt -bint 1 Enable interrupt. Both of these commands had no affect on releasing the interrupt line therefore preventing other cards from generating an interrupt
Appears this card requires investigation into the firmware loaded
Hardware
Card Version V7.0
Firmware
Watchdog Control Software ver 2.04

3)
WDT Watchdog Documentation on your Server is out of date & doesn't cover the card being sold
Schematics V6 & V7 "https://sequentmicrosystems.com/pages/super-watchdog-downloads" is UPTODATE
User Guide V6 "https://sequentmicrosystems.com/pages/super-watchdog-downloads" No User Guide for Version 7 or any mention of command line command -bint
Python Documentation Readme.md No mention of being able to enable or Disable Interrupt control or being able to read from Python if Interrupt control is enabled.

4) RTD Cards do not generate an interrupt from its push button mounted on the side of the card
Hardware
Card Version 6-31
Firmware
rtd v1.3.0 Copyright (c) 2016 - 2023 Sequent Microsystems

5) 8mosind-rpi Card

User guide V3.0 does not match Hardware Card V6.31
Hardware Schematics V5.0 do not match or mention if they cover Hardware Card V6.31

6)
16inpind-rpi Card V1.0
web site "https://sequentmicrosystems.com/pages/sixteen-inputs-downloads" refers to 2 different Schematics V2 & V3 neither indicate which hardware Card to are applicable too. Investigation it looks like V2 Schematics applies to V1,0 Hardware
Interrupt on this V1.0 Card is only generated by the side mounted push button.

7) Any indication when a 16Digitalinput card will be available using the STM processor as shown on schematics V3.0 & generate an input on change of an input.
This feature would Hughley beneficial to my Python script as digital inputs change in my situation change maybe once a day or maybe a couple times a day. Currently polling every time through the main loop or check every second or 1/2 second. Timed checking is not good as could miss a change. Interrupt on Change would be preferential & beneficial free up the RPI to do other things of importance & freeing up the number I2C checks. currently getting close to a bottle neck on i2C access.

8) Future Wish List
a) With All future Cards to support Interrupt driven from the on board STM processor Enabled/Disabled from command line & Python
b) Selection of 1 out of 3 different Interrupts to appear on 1 of 3 different RPi Pins. the selection of which interrupt to use on which RPi pin changeable via solder pads with the card defaulted to one of the 3 RPI Interrupt pins on the RPi connector
or Alternatively bring out 3 lines from the STM to 3 separate RPi Connector pins & enable the Interrupt from either Command line or Python
Selecting which interrupt to use & therefore which RPi connector pin it will appear on. With the preferred python Firmware selection this would then enable 3 different Python Interrupts & make the python interrupt handler simpler & free up (Reduce) the number of I2C checks to be done each processor loop.

My Immediate requirement is item 1, 2, 3) to get the WDT card functioning correctly & not holding the Interrupt line & prevent the SMLCD card generating an interrupt when buttons are pressed or rotary encoder changes

Sorry about the length of this post
I await your earliest reply
Regards Tony Doust
 

TonyD

New member
Hi Alex
SMLCD Interrupt & Mosfet side button switch works really good interrupting without the WDT card installed
The WDT card is holding the interrupt line.

I have uploaded a simple python script to demo the functioning Interrupts

In your leisure if you could advise time frame for new firmware for the WDT Card to prevent it holding the interrupt line
Thankyou for all the help provide

Regards Tony
 

Attachments

  • interrupt.txt
    3.1 KB · Views: 0
Top