On Mon, 18 Jan 2021, Ralph Stirling wrote:
Date: Mon, 18 Jan 2021 16:40:29 +0000
From: Ralph Stirling <ralph.stirl...@wallawalla.edu>
Reply-To: "Enhanced Machine Controller (EMC)"
<emc-users@lists.sourceforge.net>
To: "emc-users@lists.sourceforge.net" <emc-users@lists.sourceforge.net>
Subject: [Emc-users] Another Mesa vhdl question
The AD7740 v-to-f converters don't work as well
as I'd like, and I'm thinking about just using a
little microcontroller, like the STM32G031 to do
my A/D conversion. While I could generate a
pulse train with frequency or period proportional
to voltage, I got to looking at bit files that include
a UART. For the tiny amounts of data I need to
send, the simple UART with 115kbaud rate should
work fine at normal servo thread periods.
So, I have tried both stock *UA* bitfiles and a custom
bitfile with UART incorporated, and I get errors about
InstanceStride not matching expectations with either.
Turning on debug_idrom, I see that InstanceStride is
either 0x04 or 0x40, but the expected value is 0x10.
It isn't clear to me whether I want to select Instance
Stride 0 or 1 in my vhdl, but neither would match the
expected value.
hm2/hm2_7i90.0: Instance Stride 0: 0x00000004
hm2/hm2_7i90.0: Instance Stride 1: 0x00000040
hm2/hm2_7i90.0: Register Stride 0: 0x00000100
hm2/hm2_7i90.0: Register Stride 1: 0x00000100
hm2/hm2_7i90.0: inconsistent Module Descriptor for UART Transmit Channel, not
loading driver
hm2/hm2_7i90.0: Version = 0, expected 0
hm2/hm2_7i90.0: NumRegisters = 4, expected 4
hm2/hm2_7i90.0: InstanceStride = 0x00000040, expected 0x00000010
hm2/hm2_7i90.0: MultipleRegisters = 0x0000000F, expected 0x0000000F
hm2/hm2_7i90.0: inconsistent Module Descriptor!
hm2/hm2_7i90.0: failed to parse Module Descriptor 4
Am I doing something wrong, has a bug crept into the
code, or is this just untested territory? If it is a bug, is
it in the vhdl or the hostmot2 code?
Thanks again,
-- Ralph
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
Note that you can improve V-F readout performance by setting the
encoders "hires-timestamp" pin true
The UART requires the alternate instance stride (stride 1) set to 0x10
This is done in the top level file (its a awful kludge and means some
typs of modules cannot be combined)
I would suggest using the PKTUART instead as the PKTUART
uses standard instance strides (0= 0x04,1=0x40)
Peter Wallace
Mesa Electronics
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users