16bit resolution PWM wave player with SD card, super lite version.

Dependencies:   mbed DirectSPI FastPWM

Supported boards (confirmed):
Nucleo-F030R8
Nucleo-L152RE
Nucleo-F401RE
Nucleo-F411RE

Only compilation is OK (unchecked, but may work):
Nucleo-L073RZ
Nucleo-F334R8
Nucleo-F303RE
Nucleo-F429ZI
Nucleo-F446RE
Nucleo-F446ZE
Nucleo-L476RG

Supported SD card:
SDSC/SDHC card,
FAT16 and FAT32.
(1) At first, format SD card using SD Card Formatter
https://www.sdcard.org/downloads/formatter_4/index.html
(2) Copy PCM wav files to the SD card.
Supported file:
PCM wave file that have file extension ".wav" on root directory.
16bit/8bit, fs(sampling rate)=32kHz,44.1kHz,48kHz.
Stereo/Mono.

Hardware setting:
Refer to the file port_setting.txt
PWM output port:
Left upper(Hi) PWM 8bit out: PB_5 (TM3_CH2)
Right upper(Hi) PWM 8bit out: PB4 (TM3_CH1)
Left lower(Low) PWM 8bit out: PC_9 (TM3_CH4)
Right lower(Low) PWM 8bit out: PC_8 (TM3_CH3)
http://mpu.up.seesaa.net/image/16bit-wave-player-output-schema.png
USER_BUTTON: PC_13(default button)
Next song: One click in Play mode.
Pause : Push long time .
Play : One click from Pause.

Committer:
mimi3
Date:
Sun Feb 17 11:48:22 2019 +0900
Revision:
15:71234f70f31f
Parent:
2:462a8c5972ef
added: license

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mimi3 1:40b9a7f3f05c 1 sd_card.cpp is under Apache licence.
mimi3 1:40b9a7f3f05c 2 FastPWM : refer to https://os.mbed.com/users/Sissors/code/FastPWM/.
mimi3 1:40b9a7f3f05c 3 DirectSPI: refer to https://os.mbed.com/users/mimi3/code/DirectSPI/.
mimi3 1:40b9a7f3f05c 4
mimi3 15:71234f70f31f 5 all other files are under MIT Licese.
mimi3 15:71234f70f31f 6
mimi3 15:71234f70f31f 7
mimi3 15:71234f70f31f 8
mimi3 15:71234f70f31f 9 MIT License
mimi3 15:71234f70f31f 10
mimi3 15:71234f70f31f 11 Copyright (c) 2019 audin (http://mcu.seesaa.net)
mimi3 15:71234f70f31f 12
mimi3 15:71234f70f31f 13 Permission is hereby granted, free of charge, to any person obtaining a copy
mimi3 15:71234f70f31f 14 of this software and associated documentation files (the "Software"), to deal
mimi3 15:71234f70f31f 15 in the Software without restriction, including without limitation the rights
mimi3 15:71234f70f31f 16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
mimi3 15:71234f70f31f 17 copies of the Software, and to permit persons to whom the Software is
mimi3 15:71234f70f31f 18 furnished to do so, subject to the following conditions:
mimi3 15:71234f70f31f 19
mimi3 15:71234f70f31f 20 The above copyright notice and this permission notice shall be included in all
mimi3 15:71234f70f31f 21 copies or substantial portions of the Software.
mimi3 15:71234f70f31f 22
mimi3 15:71234f70f31f 23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
mimi3 15:71234f70f31f 24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
mimi3 15:71234f70f31f 25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
mimi3 15:71234f70f31f 26 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
mimi3 15:71234f70f31f 27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
mimi3 15:71234f70f31f 28 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
mimi3 15:71234f70f31f 29 SOFTWARE.