Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Armmite - STM32H7: Developments Post ReplyPost New Topic
<< Prev Page of 12 Next >>
Author
Message << Prev Topic | Next Topic >>
geeken
Newbie
Newbie


Joined: 13 January 2018
Location: United States
Online Status: Offline
Posts: 8
Posted: 28 June 2018 at 5:32am | IP Logged Quote geeken

matherp wrote:
Quote:
Has anyone had experience with the ST 'C' compiler ;

https://atollic.com/truestudio/


Yes - hated it it

First, it is the same compiler and linker as everything else - The GCC compiler and linker
Second, it is the same IDE as everything else - Eclipse

The differences then are how it integrates them into a tool chain and I found it clunky and difficult compared to the (also free) "System Workbench for STM32"

Installing it "bu...ed" up the SW install as it uses all the same extensions and if you import a project into it it "bu..ers" up the project for everything else. I never got the debugger to work properly over St-link. It doesn't create normal "release" and "debug" versions when you create a new project and the toolbar usage is bizarre compared to other eclipse implementations.


*
Peter

Goes to show - looks can potentially be very deceiving !

Thanks for giving it to us straight - appreciate your feedback.

GeeKen



Back to Top View geeken's Profile Search for other posts by geeken
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2164
Posted: 29 June 2018 at 10:44pm | IP Logged Quote matherp

Please find attached 5.4.19

2018-06-30_021248_Armmite.zip

This implements analogue to digital conversion (this just leaves PWM of the basic MM capabilities)

Valid analogue pins are:

13, 14, 15, 18, 19, 20, 21, 22, 26, 27, 28, 29, 34, 35, 36, 37, 42, 43, 44, 45, 46, 47, 49, 50, 53, 54

usage is as per the MM and as with the MM the voltages assume the chip is fed with 3.3V

SETPIN n,AIN
? pin(n)

In addition there are 6 "pseudo" pins (no SETPIN required)

DAC1, DAC2, TEMP, BAT, IREF, SREF

usage is:

? pin(DAC1) ' reads the voltage currently being output on DAC1
? pin(DAC2) ' reads the voltage currently being output on DAC2
? pin(BAT) ' reads the backup battery voltage input to the RTC
? pin(TEMP)' reads the die temperature of the chip in DegC
? pin(IREF)' reads the internal reference voltage given the current VDD
? pin(SREF)' reports the calibrated reference voltage at an accurate VDD of 3.3V

The ratio SREF/IREF can be used to scale the readings for a VDD of other than 3.3V (not applicable to the Nucleo)

Edited by matherp on 30 June 2018 at 2:14am
Back to Top View matherp's Profile Search for other posts by matherp
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2544
Posted: 30 June 2018 at 10:06am | IP Logged Quote TassyJim

Thank you Peter.
Another big step forward.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2164
Posted: 30 June 2018 at 6:48pm | IP Logged Quote matherp

I've started work on PWM which has caused some pin changes. There will be eight PWM channels, 4 on each of PWM 1 and PWM 2. I think the final allocation will be as follows:

         { GPIOE,  GPIO_PIN_2,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 1 SSD_D2
         { GPIOE,  GPIO_PIN_3,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 2 SSD_D3
         { GPIOE,  GPIO_PIN_4,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 3 SSD_D4
         { GPIOE,  GPIO_PIN_5,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 4 SSD_D5
         { GPIOE,  GPIO_PIN_6,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 5 SSD_D6
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 6 VBAT
         { GPIOC,  GPIO_PIN_13,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 7 - Push Button
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 8 OSC32-IN
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 9 OSC32-OUT
         { GPIOF,  GPIO_PIN_0, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 10 COUNT1
         { GPIOF,  GPIO_PIN_1,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 11 COUNT2
         { GPIOF,  GPIO_PIN_2,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 12 COUNT3
         { GPIOF,  GPIO_PIN_3,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_5},     // pin 13 COUNT4
         { GPIOF,  GPIO_PIN_4,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_9},     // pin 14 IR
         { GPIOF,  GPIO_PIN_5,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_4},     // pin 15
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 16 VSS
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 17 VDD
          { GPIOF,  GPIO_PIN_6,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_8},     // pin 18
          { GPIOF,  GPIO_PIN_7,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_3},     // pin 19 SPI5-CLK
          { GPIOF,  GPIO_PIN_8,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_7},     // pin 20 SPI5-IN
          { GPIOF,  GPIO_PIN_9,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_2},     // pin 21 SPI5-OUT
         { GPIOF,  GPIO_PIN_10,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_6},    // pin 22
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 23 RCC-OSCIN
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 24 RCC-OSCOUT
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 25 NRST
         { GPIOC,  GPIO_PIN_0,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_10},    // pin 26
         { GPIOC,  GPIO_PIN_1,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_11},    // pin 27 SPI2-OUT
         { GPIOC,  GPIO_PIN_2, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_0},      // pin 28 SPI2-IN
         { GPIOC,  GPIO_PIN_3, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC3, ADC_CHANNEL_1},      // pin 29
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 30 VDD
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 31 VSSA
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 32 VREF+
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 33 VDDA
         { GPIOA,  GPIO_PIN_0,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_16},    // pin 34 PWM-2A
         { GPIOA,  GPIO_PIN_1,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_17},    // pin 35 PWM-2B
         { GPIOA,  GPIO_PIN_2,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_14},    // pin 36 PWM-2C
     //
          { GPIOA,  GPIO_PIN_3,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_15},    // pin 37 PWM-2D
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 38 VSS
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 39 VDD
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 40 DAC1
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 41 DAC2
          { GPIOA,  GPIO_PIN_6,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_3},     // pin 42 SPI-IN
          { GPIOA,  GPIO_PIN_7,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_7},     // pin 43 SPI-OUT
         { GPIOC,  GPIO_PIN_4,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_4},     // pin 44
         { GPIOC,  GPIO_PIN_5, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_8},      // pin 45
         { GPIOB,  GPIO_PIN_0, DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_9},      // pin 46 Green-LED
         { GPIOB,  GPIO_PIN_1,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_5},     // pin 47
         { GPIOB,  GPIO_PIN_2,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 48 SPI3-CLK
         { GPIOF,  GPIO_PIN_11,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_2},    // pin 49
         { GPIOF,  GPIO_PIN_12,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN , ADC1, ADC_CHANNEL_6},    // pin 50
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 51 VSS
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 52 VDD
          { GPIOF,  GPIO_PIN_13,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN ,ADC2, ADC_CHANNEL_2},     // pin 53
          { GPIOF,  GPIO_PIN_14,  DIGITAL_IN | DIGITAL_OUT | ANALOG_IN ,ADC2, ADC_CHANNEL_6},     // pin 54
          { GPIOF,  GPIO_PIN_15,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 55
         { GPIOG,  GPIO_PIN_0,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 56
         { GPIOG,  GPIO_PIN_1,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 57 SSD_RS
         { GPIOE,  GPIO_PIN_7,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 58 SSD_D7
         { GPIOE,  GPIO_PIN_8,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 59 SSD_D8
         { GPIOE,  GPIO_PIN_9,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                      // pin 60 SSD_D9
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 61 VSS
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 62 VDD
         { GPIOE,  GPIO_PIN_10,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 63 SSD_D10
         { GPIOE,  GPIO_PIN_11,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 64 SSD_D11
         { GPIOE,  GPIO_PIN_12,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 65 SSD_D12
         { GPIOE,  GPIO_PIN_13,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 66 SSD_D13
         { GPIOE,  GPIO_PIN_14,  DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                     // pin 67 SSD_D14
         { GPIOE,  GPIO_PIN_15, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 68 SSD_D15
          { GPIOB,  GPIO_PIN_10, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 69 I2C2-SCL
          { GPIOB,  GPIO_PIN_11, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 70 I2C2-SDA
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 71 VCAP
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 72 VDD
     ///
         { GPIOB,  GPIO_PIN_12, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 73 COM3-RX (UART5)
         { GPIOB,  GPIO_PIN_13, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 74 COM3-TX (UART5)
         { GPIOB,  GPIO_PIN_14, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 75 Red-LED
         { GPIOB,  GPIO_PIN_15, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                               // pin 76 COM1-RX
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 77 CONSOLE-TX
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 78 CONSOLE-RX
         { GPIOD,  GPIO_PIN_10, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 79
         { GPIOD,  GPIO_PIN_11, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 80
         { GPIOD,  GPIO_PIN_12, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 81 PWM-1A
         { GPIOD,  GPIO_PIN_13, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 82 PWM-1B
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 83 VSS
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 84 VDD
          { GPIOD,  GPIO_PIN_14, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 85 PWM-1C
          { GPIOD,  GPIO_PIN_15, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 86 PWM-1D
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 87 SD_CD
          { GPIOG,  GPIO_PIN_3, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 88
          { GPIOG,  GPIO_PIN_4, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 89
          { GPIOG,  GPIO_PIN_5, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 90
          { GPIOG,  GPIO_PIN_6, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 91
          { GPIOG,  GPIO_PIN_7, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 92
          { GPIOG,  GPIO_PIN_8, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 93
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 94 VSS
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 95 VDDUSB
         { GPIOC,  GPIO_PIN_6, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 96
         { GPIOC,  GPIO_PIN_7, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 97
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 98 SD_D0
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 99 SD_D1
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 100 USB_SOF
          { GPIOA,  GPIO_PIN_9, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 101 USB-VBUS
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 102 USB-ID
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 103 USB-D+
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 104 USB-D-
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 105 SWDIO
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 106 VCAP
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 107 VSS
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 108 VDD
         //
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 109 SWCLK
          { GPIOA,  GPIO_PIN_15, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 110
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 111 SD_D2
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 112 SD_D3
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 113 SD_CLK
         { GPIOD,  GPIO_PIN_0, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 114
         { GPIOD,  GPIO_PIN_1, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 115
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 116 SD_CMD
         { GPIOD,  GPIO_PIN_3, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 117 SPI2-CLK
         { GPIOD,  GPIO_PIN_4, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 118 COM2-DE
         { GPIOD,  GPIO_PIN_5, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 119 COM2-TX
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 120 VSS
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 121 VDD
         { GPIOD,  GPIO_PIN_6, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 122 COM2-RX
         { GPIOD,  GPIO_PIN_7, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 123
         { GPIOG,  GPIO_PIN_9, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 124 COM4-RX (USART6)
         { GPIOG,  GPIO_PIN_10, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 125 SSD_WR
         { GPIOG,  GPIO_PIN_11, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 126 SPI-CLK
         { GPIOG,  GPIO_PIN_12, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 127 SSD_RESET
         { GPIOG,  GPIO_PIN_13, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 128 SSD_RD
         { GPIOG,  GPIO_PIN_14, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 129 COM4-TX (USART6)
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 130 VSS
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 131 VDD
         { GPIOG,  GPIO_PIN_15, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                // pin 132
         { GPIOB,  GPIO_PIN_3, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 133 SPI3-CLK
         { GPIOB,  GPIO_PIN_4, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 134 SPI3-IN
         { GPIOB,  GPIO_PIN_5, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 135
         { GPIOB,  GPIO_PIN_6, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 136 COM1-TX
          { GPIOB,  GPIO_PIN_7, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 137 Blue-LED
         { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 138 BOOT0
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 139 I2C-SCL
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 140 I2C-SDA
         { GPIOE,  GPIO_PIN_0, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 141 SSD_D0
         { GPIOE,  GPIO_PIN_1, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 142 SSD_D1
          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 143 PDR-ON
          { NULL,  0, PUNUSED , NULL, 0},                                                                 // pin 144 VDD


Edited by matherp on 30 June 2018 at 8:58pm
Back to Top View matherp's Profile Search for other posts by matherp
 
goc30
Regular Member
Regular Member
Avatar

Joined: 12 April 2017
Location: France
Online Status: Offline
Posts: 66
Posted: 01 July 2018 at 8:37am | IP Logged Quote goc30

Hi all
Hi Peter

here new excel spreadsheet with update
in "Cn" sheet I add 2 columns with remove/add infos

You have change IR position ??

2018-07-01_083725_NUCLEO-H743ZI-pinout3.zip
Back to Top View goc30's Profile Search for other posts by goc30
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2164
Posted: 02 July 2018 at 3:05am | IP Logged Quote matherp

Please find attached Version 5.04.20

2018-07-02_024859_Armmite.zip

This includes full PWM and SERVO functionality

Syntax is exactly as per the Micromite except there are four possible outputs on both channel 1 and channel 2

PWM 1, freq, 1A, 1B, 1C, 1D
PWM 2, freq, 1A, 1B, 1C, 1D
SERVO 1 [, freq], 1A, 1B, 1C, 1D
SERVO 1 [, freq], 1A, 1B, 1C, 1D


Minimum frequency is 1Hz, maximum is 20MHz. Duty cycle and frequency accuracy will depend on frequency. The frequency can be any value of 200,000,000/n.
The number of bits (counts) of accuracy of the duty cycle is given by the algorithm


prescale=0
do 
    prescale= prescale+1
    count=CINT(200,000,000/prescale/frequency)
loop until count<65536


for a desired frequency of 192,000Hz this will give a prescale factor of 1 and a count of 1042. i.e. the actual frequency will be 200,000,000 /1042 = 191,938.6 Hz and the duty cycle will be accurate to 1 in 1042

Pins are:
// PWM pin numbers
PWM_CH1_PIN         81 //PD12  - PWM1A
PWM_CH2_PIN         82 //PD13  - PWM1B
PWM_CH3_PIN         85 //PD14  - PWM1C
PWM_CH4_PIN         86 //PD15  - PWM1D
PWM_CH5_PIN         34 //PA0   - PWM2A
PWM_CH6_PIN         35 //PA1   - PWM2B
PWM_CH7_PIN         36 //PA2   - PWM2C
PWM_CH8_PIN         37 //PA3   - PWM2D


Quote:
You have change IR position ??


Don't believe so - has anyone tested IR? I haven't had the chance so far.


Edited by matherp on 02 July 2018 at 3:06am
Back to Top View matherp's Profile Search for other posts by matherp
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2544
Posted: 02 July 2018 at 7:48am | IP Logged Quote TassyJim

matherp wrote:

Quote:
You have change IR position ??


Don't believe so - has anyone tested IR? I haven't had the chance so far.


That might have been my spreadsheet at fault.
You started of on pin 14 and are still there.
I will try and source an IR receiver today and test the IR.

Thanks again
Jim


__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2544
Posted: 02 July 2018 at 6:11pm | IP Logged Quote TassyJim

Quote:
// pin 48 SPI3-CLK

// pin 133 SPI3-CLK



I think pin 48 should be SPI3_OUT
(That's what it was previously)

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2164
Posted: 02 July 2018 at 6:33pm | IP Logged Quote matherp

Quote:
I think pin 48 should be SPI3_OUT
(That's what it was previously)


Correct - sorry
Back to Top View matherp's Profile Search for other posts by matherp
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2164
Posted: 03 July 2018 at 1:39am | IP Logged Quote matherp

Some more pinout changes

          { NULL,  0, PUNUSED , NULL, 0},                                                            // pin 91 USB-POWER
          { GPIOA,  GPIO_PIN_8, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 100
          { GPIOA,  GPIO_PIN_9, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 101
          { GPIOA, GPIO_PIN_10, DIGITAL_IN | DIGITAL_OUT , NULL, 0},                                 // pin 102



I'm intending to support USB in host mode only. Pin 91 is used on the nucleo to apply power to the USB port so it is needed for that. USB pins ID, VBUS, and SOF are not needed in host mode so can be returned for general I/O.

Current status is that USB keyboard operation is basically working for normal ascii lower case and shifted characters. Control characters, function keys and lock functions need work to understand how to implement them on the STM32.

By default the USB keyboard will be disabled as it has a small performance impact. It will be enabled as per the MMX:

Quote:
OPTION USBKEYBOARD layout: Sets the key layout for a connected USB keyboard. Valid layouts are "UK" and "US", use "DISABLE" to stop USB processing. This is a permanently stored option.


Edited by matherp on 03 July 2018 at 1:42am
Back to Top View matherp's Profile Search for other posts by matherp
 
Micro-80
Newbie
Newbie


Joined: 03 March 2017
Location: Russian Federation
Online Status: Offline
Posts: 25
Posted: 03 July 2018 at 2:52am | IP Logged Quote Micro-80

Hi Peter!

Reading one analog channel takes approximately 2 milliseconds. Is it possible to reduce the polling time?
Back to Top View Micro-80's Profile Search for other posts by Micro-80
 
matherp
Guru
Guru


Joined: 11 December 2012
Location: United Kingdom
Online Status: Offline
Posts: 2164
Posted: 05 July 2018 at 4:13am | IP Logged Quote matherp

Please find attached V5.03.21

2018-07-05_040333_Armmite.zip

This includes full support for a USB keyboard. Just plug into the CN13 connector using a suitable adapter and enable it in software. This release is also updated with Geoff's latest changes to the MMBasic core including the new STATIC keyword and increased performance. (Grainbench now giving 9312 up from 8808, 9280 with USB enabled)

Quote:
OPTION USBKEYBOARD layout: Sets the key layout for a connected USB keyboard. Valid layouts are "UK" and "US", use "DISABLE" to stop USB processing. This is a permanently stored option.


Quote:
Reading one analog channel takes approximately 2 milliseconds. Is it possible to reduce the polling time?


I've set the ADC up for maximum accuracy - 16-bit conversion with 16x oversampling and 387 clock cycles per sample. I can reduce this but everything I tried reduced accuracy.

Maybe in a future release I'll include some level of user control for the conversion

Edited by matherp on 05 July 2018 at 5:19pm
Back to Top View matherp's Profile Search for other posts by matherp
 


<< Prev Page of 12 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1406 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.14