Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Hal porting #44

Merged
merged 29 commits into from
Jun 30, 2017
Merged

Hal porting #44

merged 29 commits into from
Jun 30, 2017

Conversation

fpistm
Copy link
Contributor

@fpistm fpistm commented May 18, 2017

Ciao Francesco,

Here the full HAL porting.
Audio is missing but will be available soon. available
DFU is not implemented. (thanks @cparata)

Tested with Arduino 1.8.2.

You will need to install CMSIS 4.5.0 package.

fpistm added 9 commits May 18, 2017 17:35
Remove CMSIS sources, package CMSIS 4.5.0 from arduino
will be uses as dependency.
Remove static library.
Remove FatFs.

Signed-off-by: Frederic.Pillon <[email protected]>
HAL and CMSIS device.

Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
@alfran
Copy link
Contributor

alfran commented Jun 6, 2017

I found some issue:

  1. PWM not works
  2. SPI connected to ICSP connector not works
  3. I2C and I2C1 not works
  4. Recording using The microphone the Audio "jump" (some part of audio data is lost)

fpistm and others added 7 commits June 6, 2017 15:21
Signed-off-by: Frederic.Pillon <[email protected]>
Moreover it seems there is a pin numbering misalignement between the schematic
and the printed one on the connector.

Connector start at 22 while shcematics start a 23 (no 22 on the schematics)

Possible enhancement:
D77 could be removed
and
#define LCD_BL                  D77
could be set to D22

Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Carlo.Parata <[email protected]>
2 examples
- Player
- recorder

Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Carlo.Parata <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm
Copy link
Contributor Author

fpistm commented Jun 6, 2017

There was an issue when I add commit from Carlo, that's why PWM is not working. Now it is corrected.
For Audio and I2C, I do not see any issue.
SPI have to be corrected.

fpistm and others added 11 commits June 8, 2017 09:58
Get the correct timer freq depending on timer clock source.

Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
Signed-off-by: Frederic.Pillon <[email protected]>
To be inline with https://www.arduino.cc/en/Reference/SPITransfer
"In case of buffer transfers the received data is stored in the buffer
in-place (the old data is replaced with the data received)."

Signed-off-by: Frederic.Pillon <[email protected]>
PULLDOWN or PULLUP the SCK pin according the polarity used.

Fix bcmi-labs#24

Signed-off-by: Carlo.Parata <[email protected]>
Issue was due to the fact that sometimes the code remained blocked
inside the timer callback after the closure of the USB serial port.
In order to avoid that, some checks inside the timer callbeck and
the CDC_Flush API have been added.

Improving the calculation of the period and prescaler of the timer.

Signed-off-by: Carlo.Parata <[email protected]>
fpistm added 2 commits June 21, 2017 08:03
analogRead(A0) == analogRead(0)
analogWrite(A0) != analogWrite(0) == analogWrite(D0)
All pins available in PinMap_ADC are available with Ax alias

Move pin functions to pins_arduino.c to avoid duplicated code.
Pin functions naming alignement.

Move init() function to pins_arduino.c to avoid duplicated code
and define it as weak.

Minor clean of unused code.
Remove usb flags for variants w/o usb.
Serialx under switch.Disable by default

Now, variant files only contain source which differ for each variants.

Signed-off-by: Frederic Pillon <[email protected]>
@alfran alfran merged commit d425a28 into bcmi-labs:development Jun 30, 2017
@alfran
Copy link
Contributor

alfran commented Jun 30, 2017

@cparata, @fpistm: Thank you so much guys! was a pleasure!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants