Stereo D/A Converter - Page 1
Forum section: electronics / general

author: alizare368
author_rank: Regular Contributor
timestamp: January 30, 2019, 03:45:53 pm
content: HiI'm using the CS4344 audio codec That channel on the left doesn't work.this is my sine table:Code:const uint16_t sine_table={0X8000, 0X8064, 0X80C9, 0X812D, 0X8192, 0X81F6, 0X825B, 0X82BF, 0X8324, 0X8388, 0X83ED, 0X8451, 0X84B6, 0X851A, 0X857E, 0X85E3,0X8647, 0X86AC, 0X8710, 0X8774, 0X87D9, 0X883D, 0X88A1, 0X8906, 0X896A, 0X89CE, 0X8A32, 0X8A97, 0X8AFB, 0X8B5F, 0X8BC3, 0X8C27,0X8C8B, 0X8CEF, 0X8D53, 0X8DB7, 0X8E1B, 0X8E7F, 0X8EE3, 0X8F47, 0X8FAB, 0X900E, 0X9072, 0X90D6, 0X9139, 0X919D, 0X9201, 0X9264,0X92C7, 0X932B, 0X938E, 0X93F2, 0X9455, 0X94B8, 0X951B, 0X957E, 0X95E1, 0X9645, 0X96A7, 0X970A, 0X976D, 0X97D0, 0X9833, 0X9895,0X98F8, 0X995B, 0X99BD, 0X9A20, 0X9A82, 0X9AE4, 0X9B47, 0X9BA9, 0X9C0B, 0X9C6D, 0X9CCF, 0X9D31, 0X9D93, 0X9DF4, 0X9E56, 0X9EB8,0X9F19, 0X9F7B, 0X9FDC, 0XA03E, 0XA09F, 0XA100, 0XA161, 0XA1C2, 0XA223, 0XA284, 0XA2E5, 0XA345, 0XA3A6, 0XA406, 0XA467, 0XA4C7,0XA527, 0XA588, 0XA5E8, 0XA648, 0XA6A7, 0XA707, 0XA767, 0XA7C7, 0XA826, 0XA885, 0XA8E5, 0XA944, 0XA9A3, 0XAA02, 0XAA61, 0XAAC0,0XAB1F, 0XAB7D, 0XABDC, 0XAC3A, 0XAC98, 0XACF6, 0XAD55, 0XADB3, 0XAE10, 0XAE6E, 0XAECC, 0XAF29, 0XAF87, 0XAFE4, 0XB041, 0XB09E,0XB0FB, 0XB158, 0XB1B5, 0XB211, 0XB26E, 0XB2CA, 0XB326, 0XB382, 0XB3DE, 0XB43A, 0XB496, 0XB4F1, 0XB54D, 0XB5A8, 0XB603, 0XB65E,0XB6B9, 0XB714, 0XB76F, 0XB7C9, 0XB824, 0XB87E, 0XB8D8, 0XB932, 0XB98C, 0XB9E6, 0XBA3F, 0XBA99, 0XBAF2, 0XBB4B, 0XBBA4, 0XBBFD,0XBC56, 0XBCAF, 0XBD07, 0XBD5F, 0XBDB7, 0XBE0F, 0XBE67, 0XBEBF, 0XBF17, 0XBF6E, 0XBFC5, 0XC01C, 0XC073, 0XC0CA, 0XC121, 0XC177,0XC1CD, 0XC224, 0XC279, 0XC2CF, 0XC325, 0XC37A, 0XC3D0, 0XC425, 0XC47A, 0XC4CF, 0XC524, 0XC578, 0XC5CC, 0XC621, 0XC675, 0XC6C8,0XC71C, 0XC770, 0XC7C3, 0XC816, 0XC869, 0XC8BC, 0XC90F, 0XC961, 0XC9B3, 0XCA05, 0XCA57, 0XCAA9, 0XCAFB, 0XCB4C, 0XCB9D, 0XCBEE,0XCC3F, 0XCC90, 0XCCE0, 0XCD30, 0XCD81, 0XCDD0, 0XCE20, 0XCE70, 0XCEBF, 0XCF0E, 0XCF5D, 0XCFAC, 0XCFFB, 0XD049, 0XD097, 0XD0E5,0XD133, 0XD181, 0XD1CE, 0XD21B, 0XD268, 0XD2B5, 0XD302, 0XD34E, 0XD39A, 0XD3E6, 0XD432, 0XD47E, 0XD4C9, 0XD514, 0XD55F, 0XD5AA,0XD5F5, 0XD63F, 0XD689, 0XD6D3, 0XD71D, 0XD767, 0XD7B0, 0XD7F9, 0XD842, 0XD88B, 0XD8D3, 0XD91B, 0XD964, 0XD9AB, 0XD9F3, 0XDA3A,0XDA82, 0XDAC9, 0XDB0F, 0XDB56, 0XDB9C, 0XDBE2, 0XDC28, 0XDC6E, 0XDCB3, 0XDCF8, 0XDD3D, 0XDD82, 0XDDC7, 0XDE0B, 0XDE4F, 0XDE93,0XDED7, 0XDF1A, 0XDF5D, 0XDFA0, 0XDFE3, 0XE025, 0XE068, 0XE0AA, 0XE0EB, 0XE12D, 0XE16E, 0XE1AF, 0XE1F0, 0XE231, 0XE271, 0XE2B1,0XE2F1, 0XE331, 0XE370, 0XE3AF, 0XE3EE, 0XE42D, 0XE46B, 0XE4AA, 0XE4E8, 0XE525, 0XE563, 0XE5A0, 0XE5DD, 0XE61A, 0XE656, 0XE693,0XE6CF, 0XE70A, 0XE746, 0XE781, 0XE7BC, 0XE7F7, 0XE831, 0XE86C, 0XE8A6, 0XE8DF, 0XE919, 0XE952, 0XE98B, 0XE9C4, 0XE9FC, 0XEA35,0XEA6D, 0XEAA4, 0XEADC, 0XEB13, 0XEB4A, 0XEB81, 0XEBB7, 0XEBED, 0XEC23, 0XEC59, 0XEC8E, 0XECC3, 0XECF8, 0XED2D, 0XED61, 0XED95,0XEDC9, 0XEDFD, 0XEE30, 0XEE63, 0XEE96, 0XEEC8, 0XEEFA, 0XEF2C, 0XEF5E, 0XEF8F, 0XEFC1, 0XEFF2, 0XF022, 0XF052, 0XF083, 0XF0B2,0XF0E2, 0XF111, 0XF140, 0XF16F, 0XF19D, 0XF1CB, 0XF1F9, 0XF227, 0XF254, 0XF281, 0XF2AE, 0XF2DB, 0XF307, 0XF333, 0XF35E, 0XF38A,0XF3B5, 0XF3E0, 0XF40A, 0XF435, 0XF45F, 0XF488, 0XF4B2, 0XF4DB, 0XF504, 0XF52C, 0XF555, 0XF57D, 0XF5A5, 0XF5CC, 0XF5F3, 0XF61A,0XF641, 0XF667, 0XF68D, 0XF6B3, 0XF6D8, 0XF6FE, 0XF722, 0XF747, 0XF76B, 0XF78F, 0XF7B3, 0XF7D7, 0XF7FA, 0XF81D, 0XF83F, 0XF862,0XF884, 0XF8A5, 0XF8C7, 0XF8E8, 0XF909, 0XF929, 0XF94A, 0XF969, 0XF989, 0XF9A9, 0XF9C8, 0XF9E6, 0XFA05, 0XFA23, 0XFA41, 0XFA5F,0XFA7C, 0XFA99, 0XFAB6, 0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ECC3, 0XEC8E, 0XEC59, 0XEC23, 0XEBED, 0XEBB7, 0XEB81, 0XEB4A, 0XEB13, 0XEADC, 0XEAA4,0XEA6D, 0XEA35, 0XE9FC, 0XE9C4, 0XE98B, 0XE952, 0XE919, 0XE8DF, 0XE8A6, 0XE86C, 0XE831, 0XE7F7, 0XE7BC, 0XE781, 0XE746, 0XE70A,0XE6CF, 0XE693, 0XE656, 0XE61A, 0XE5DD, 0XE5A0, 0XE563, 0XE525, 0XE4E8, 0XE4AA, 0XE46B, 0XE42D, 0XE3EE, 0XE3AF, 0XE370, 0XE331,0XE2F1, 0XE2B1, 0XE271, 0XE231, 0XE1F0, 0XE1AF, 0XE16E, 0XE12D, 0XE0EB, 0XE0AA, 0XE068, 0XE025, 0XDFE3, 0XDFA0, 0XDF5D, 0XDF1A,0XDED7, 0XDE93, 0XDE4F, 0XDE0B, 0XDDC7, 0XDD82, 0XDD3D, 0XDCF8, 0XDCB3, 0XDC6E, 0XDC28, 0XDBE2, 0XDB9C, 0XDB56, 0XDB0F, 0XDAC9,0XDA82, 0XDA3A, 0XD9F3, 0XD9AB, 0XD964, 0XD91B, 0XD8D3, 0XD88B, 0XD842, 0XD7F9, 0XD7B0, 0XD767, 0XD71D, 0XD6D3, 0XD689, 0XD63F,0XD5F5, 0XD5AA, 0XD55F, 0XD514, 0XD4C9, 0XD47E, 0XD432, 0XD3E6, 0XD39A, 0XD34E, 0XD302, 0XD2B5, 0XD268, 0XD21B, 0XD1CE, 0XD181,0XD133, 0XD0E5, 0XD097, 0XD049, 0XCFFB, 0XCFAC, 0XCF5D, 0XCF0E, 0XCEBF, 0XCE70, 0XCE20, 0XCDD0, 0XCD81, 0XCD30, 0XCCE0, 0XCC90,0XCC3F, 0XCBEE, 0XCB9D, 0XCB4C, 0XCAFB, 0XCAA9, 0XCA57, 0XCA05, 0XC9B3, 0XC961, 0XC90F, 0XC8BC, 0XC869, 0XC816, 0XC7C3, 0XC770,0XC71C, 0XC6C8, 0XC675, 0XC621, 0XC5CC, 0XC578, 0XC524, 0XC4CF, 0XC47A, 0XC425, 0XC3D0, 0XC37A, 0XC325, 0XC2CF, 0XC279, 0XC224,0XC1CD, 0XC177, 0XC121, 0XC0CA, 0XC073, 0XC01C, 0XBFC5, 0XBF6E, 0XBF17, 0XBEBF, 0XBE67, 0XBE0F, 0XBDB7, 0XBD5F, 0XBD07, 0XBCAF,0XBC56, 0XBBFD, 0XBBA4, 0XBB4B, 0XBAF2, 0XBA99, 0XBA3F, 0XB9E6, 0XB98C, 0XB932, 0XB8D8, 0XB87E, 0XB824, 0XB7C9, 0XB76F, 0XB714,0XB6B9, 0XB65E, 0XB603, 0XB5A8, 0XB54D, 0XB4F1, 0XB496, 0XB43A, 0XB3DE, 0XB382, 0XB326, 0XB2CA, 0XB26E, 0XB211, 0XB1B5, 0XB158,0XB0FB, 0XB09E, 0XB041, 0XAFE4, 0XAF87, 0XAF29, 0XAECC, 0XAE6E, 0XAE10, 0XADB3, 0XAD55, 0XACF6, 0XAC98, 0XAC3A, 0XABDC, 0XAB7D,0XAB1F, 0XAAC0, 0XAA61, 0XAA02, 0XA9A3, 0XA944, 0XA8E5, 0XA885, 0XA826, 0XA7C7, 0XA767, 0XA707, 0XA6A7, 0XA648, 0XA5E8, 0XA588,0XA527, 0XA4C7, 0XA467, 0XA406, 0XA3A6, 0XA345, 0XA2E5, 0XA284, 0XA223, 0XA1C2, 0XA161, 0XA100, 0XA09F, 0XA03E, 0X9FDC, 0X9F7B,0X9F19, 0X9EB8, 0X9E56, 0X9DF4, 0X9D93, 0X9D31, 0X9CCF, 0X9C6D, 0X9C0B, 0X9BA9, 0X9B47, 0X9AE4, 0X9A82, 0X9A20, 0X99BD, 0X995B,0X98F8, 0X9895, 0X9833, 0X97D0, 0X976D, 0X970A, 0X96A7, 0X9645, 0X95E1, 0X957E, 0X951B, 0X94B8, 0X9455, 0X93F2, 0X938E, 0X932B,0X92C7, 0X9264, 0X9201, 0X919D, 0X9139, 0X90D6, 0X9072, 0X900E, 0X8FAB, 0X8F47, 0X8EE3, 0X8E7F, 0X8E1B, 0X8DB7, 0X8D53, 0X8CEF,0X8C8B, 0X8C27, 0X8BC3, 0X8B5F, 0X8AFB, 0X8A97, 0X8A32, 0X89CE, 0X896A, 0X8906, 0X88A1, 0X883D, 0X87D9, 0X8774, 0X8710, 0X86AC,0X8647, 0X85E3, 0X857E, 0X851A, 0X84B6, 0X8451, 0X83ED, 0X8388, 0X8324, 0X82BF, 0X825B, 0X81F6, 0X8192, 0X812D, 0X80C9, 0X8064,0X8000, 0X7F9B, 0X7F36, 0X7ED2, 0X7E6D, 0X7E09, 0X7DA4, 0X7D40, 0X7CDB, 0X7C77, 0X7C12, 0X7BAE, 0X7B49, 0X7AE5, 0X7A81, 0X7A1C,0X79B8, 0X7953, 0X78EF, 0X788B, 0X7826, 0X77C2, 0X775E, 0X76F9, 0X7695, 0X7631, 0X75CD, 0X7568, 0X7504, 0X74A0, 0X743C, 0X73D8,0X7374, 0X7310, 0X72AC, 0X7248, 0X71E4, 0X7180, 0X711C, 0X70B8, 0X7054, 0X6FF1, 0X6F8D, 0X6F29, 0X6EC6, 0X6E62, 0X6DFE, 0X6D9B,0X6D38, 0X6CD4, 0X6C71, 0X6C0D, 0X6BAA, 0X6B47, 0X6AE4, 0X6A81, 0X6A1E, 0X69BA, 0X6958, 0X68F5, 0X6892, 0X682F, 0X67CC, 0X676A,0X6707, 0X66A4, 0X6642, 0X65DF, 0X657D, 0X651B, 0X64B8, 0X6456, 0X63F4, 0X6392, 0X6330, 0X62CE, 0X626C, 0X620B, 0X61A9, 0X6147,0X60E6, 0X6084, 0X6023, 0X5FC1, 0X5F60, 0X5EFF, 0X5E9E, 0X5E3D, 0X5DDC, 0X5D7B, 0X5D1A, 0X5CBA, 0X5C59, 0X5BF9, 0X5B98, 0X5B38,0X5AD8, 0X5A77, 0X5A17, 0X59B7, 0X5958, 0X58F8, 0X5898, 0X5838, 0X57D9, 0X577A, 0X571A, 0X56BB, 0X565C, 0X55FD, 0X559E, 0X553F,0X54E0, 0X5482, 0X5423, 0X53C5, 0X5367, 0X5309, 0X52AA, 0X524C, 0X51EF, 0X5191, 0X5133, 0X50D6, 0X5078, 0X501B, 0X4FBE, 0X4F61,0X4F04, 0X4EA7, 0X4E4A, 0X4DEE, 0X4D91, 0X4D35, 0X4CD9, 0X4C7D, 0X4C21, 0X4BC5, 0X4B69, 0X4B0E, 0X4AB2, 0X4A57, 0X49FC, 0X49A1,0X4946, 0X48EB, 0X4890, 0X4836, 0X47DB, 0X4781, 0X4727, 0X46CD, 0X4673, 0X4619, 0X45C0, 0X4566, 0X450D, 0X44B4, 0X445B, 0X4402,0X43A9, 0X4350, 0X42F8, 0X42A0, 0X4248, 0X41F0, 0X4198, 0X4140, 0X40E8, 0X4091, 0X403A, 0X3FE3, 0X3F8C, 0X3F35, 0X3EDE, 0X3E88,0X3E32, 0X3DDB, 0X3D86, 0X3D30, 0X3CDA, 0X3C85, 0X3C2F, 0X3BDA, 0X3B85, 0X3B30, 0X3ADB, 0X3A87, 0X3A33, 0X39DE, 0X398A, 0X3937,0X38E3, 0X388F, 0X383C, 0X37E9, 0X3796, 0X3743, 0X36F0, 0X369E, 0X364C, 0X35FA, 0X35A8, 0X3556, 0X3504, 0X34B3, 0X3462, 0X3411,0X33C0, 0X336F, 0X331F, 0X32CF, 0X327E, 0X322F, 0X31DF, 0X318F, 0X3140, 0X30F1, 0X30A2, 0X3053, 0X3004, 0X2FB6, 0X2F68, 0X2F1A,0X2ECC, 0X2E7E, 0X2E31, 0X2DE4, 0X2D97, 0X2D4A, 0X2CFD, 0X2CB1, 0X2C65, 0X2C19, 0X2BCD, 0X2B81, 0X2B36, 0X2AEB, 0X2AA0, 0X2A55,0X2A0A, 0X29C0, 0X2976, 0X292C, 0X28E2, 0X2898, 0X284F, 0X2806, 0X27BD, 0X2774, 0X272C, 0X26E4, 0X269B, 0X2654, 0X260C, 0X25C5,0X257D, 0X2536, 0X24F0, 0X24A9, 0X2463, 0X241D, 0X23D7, 0X2391, 0X234C, 0X2307, 0X22C2, 0X227D, 0X2238, 0X21F4, 0X21B0, 0X216C,0X2128, 0X20E5, 0X20A2, 0X205F, 0X201C, 0X1FDA, 0X1F97, 0X1F55, 0X1F14, 0X1ED2, 0X1E91, 0X1E50, 0X1E0F, 0X1DCE, 0X1D8E, 0X1D4E,0X1D0E, 0X1CCE, 0X1C8F, 0X1C50, 0X1C11, 0X1BD2, 0X1B94, 0X1B55, 0X1B17, 0X1ADA, 0X1A9C, 0X1A5F, 0X1A22, 0X19E5, 0X19A9, 0X196C,0X1930, 0X18F5, 0X18B9, 0X187E, 0X1843, 0X1808, 0X17CE, 0X1793, 0X1759, 0X1720, 0X16E6, 0X16AD, 0X1674, 0X163B, 0X1603, 0X15CA,0X1592, 0X155B, 0X1523, 0X14EC, 0X14B5, 0X147E, 0X1448, 0X1412, 0X13DC, 0X13A6, 0X1371, 0X133C, 0X1307, 0X12D2, 0X129E, 0X126A,0X1236, 0X1202, 0X11CF, 0X119C, 0X1169, 0X1137, 0X1105, 0X10D3, 0X10A1, 0X1070, 0X103E, 0X100D, 0X0FDD, 0X0FAD, 0X0F7C, 0X0F4D,0X0F1D, 0X0EEE, 0X0EBF, 0X0E90, 0X0E62, 0X0E34, 0X0E06, 0X0DD8, 0X0DAB, 0X0D7E, 0X0D51, 0X0D24, 0X0CF8, 0X0CCC, 0X0CA1, 0X0C75,0X0C4A, 0X0C1F, 0X0BF5, 0X0BCA, 0X0BA0, 0X0B77, 0X0B4D, 0X0B24, 0X0AFB, 0X0AD3, 0X0AAA, 0X0A82, 0X0A5A, 0X0A33, 0X0A0C, 0X09E5,0X09BE, 0X0998, 0X0972, 0X094C, 0X0927, 0X0901, 0X08DD, 0X08B8, 0X0894, 0X0870, 0X084C, 0X0828, 0X0805, 0X07E2, 0X07C0, 0X079D,0X077B, 0X075A, 0X0738, 0X0717, 0X06F6, 0X06D6, 0X06B5, 0X0696, 0X0676, 0X0656, 0X0637, 0X0619, 0X05FA, 0X05DC, 0X05BE, 0X05A0,0X0583, 0X0566, 0X0549, 0X052D, 0X0511, 0X04F5, 0X04D9, 0X04BE, 0X04A3, 0X0488, 0X046E, 0X0454, 0X043A, 0X0421, 0X0407, 0X03EF,0X03D6, 0X03BE, 0X03A6, 0X038E, 0X0377, 0X0360, 0X0349, 0X0332, 0X031C, 0X0306, 0X02F1, 0X02DB, 0X02C6, 0X02B2, 0X029D, 0X0289,0X0276, 0X0262, 0X024F, 0X023C, 0X022A, 0X0217, 0X0205, 0X01F4, 0X01E2, 0X01D1, 0X01C1, 0X01B0, 0X01A0, 0X0190, 0X0181, 0X0172,0X0163, 0X0154, 0X0146, 0X0138, 0X012A, 0X011D, 0X0110, 0X0103, 0X00F6, 0X00EA, 0X00DE, 0X00D3, 0X00C8, 0X00BD, 0X00B2, 0X00A8,0X009E, 0X0094, 0X008B, 0X0082, 0X0079, 0X0070, 0X0068, 0X0060, 0X0059, 0X0052, 0X004B, 0X0044, 0X003E, 0X0038, 0X0032, 0X002D,0X0027, 0X0023, 0X001E, 0X001A, 0X0016, 0X0013, 0X000F, 0X000C, 0X000A, 0X0008, 0X0006, 0X0004, 0X0002, 0X0001, 0X0001, 0X0000,0X0000, 0X0000, 0X0001, 0X0001, 0X0002, 0X0004, 0X0006, 0X0008, 0X000A, 0X000C, 0X000F, 0X0013, 0X0016, 0X001A, 0X001E, 0X0023,0X0027, 0X002D, 0X0032, 0X0038, 0X003E, 0X0044, 0X004B, 0X0052, 0X0059, 0X0060, 0X0068, 0X0070, 0X0079, 0X0082, 0X008B, 0X0094,0X009E, 0X00A8, 0X00B2, 0X00BD, 0X00C8, 0X00D3, 0X00DE, 0X00EA, 0X00F6, 0X0103, 0X0110, 0X011D, 0X012A, 0X0138, 0X0146, 0X0154,0X0163, 0X0172, 0X0181, 0X0190, 0X01A0, 0X01B0, 0X01C1, 0X01D1, 0X01E2, 0X01F4, 0X0205, 0X0217, 0X022A, 0X023C, 0X024F, 0X0262,0X0276, 0X0289, 0X029D, 0X02B2, 0X02C6, 0X02DB, 0X02F1, 0X0306, 0X031C, 0X0332, 0X0349, 0X0360, 0X0377, 0X038E, 0X03A6, 0X03BE,0X03D6, 0X03EF, 0X0407, 0X0421, 0X043A, 0X0454, 0X046E, 0X0488, 0X04A3, 0X04BE, 0X04D9, 0X04F5, 0X0511, 0X052D, 0X0549, 0X0566,0X0583, 0X05A0, 0X05BE, 0X05DC, 0X05FA, 0X0619, 0X0637, 0X0656, 0X0676, 0X0696, 0X06B5, 0X06D6, 0X06F6, 0X0717, 0X0738, 0X075A,0X077B, 0X079D, 0X07C0, 0X07E2, 0X0805, 0X0828, 0X084C, 0X0870, 0X0894, 0X08B8, 0X08DD, 0X0901, 0X0927, 0X094C, 0X0972, 0X0998,0X09BE, 0X09E5, 0X0A0C, 0X0A33, 0X0A5A, 0X0A82, 0X0AAA, 0X0AD3, 0X0AFB, 0X0B24, 0X0B4D, 0X0B77, 0X0BA0, 0X0BCA, 0X0BF5, 0X0C1F,0X0C4A, 0X0C75, 0X0CA1, 0X0CCC, 0X0CF8, 0X0D24, 0X0D51, 0X0D7E, 0X0DAB, 0X0DD8, 0X0E06, 0X0E34, 0X0E62, 0X0E90, 0X0EBF, 0X0EEE,0X0F1D, 0X0F4D, 0X0F7C, 0X0FAD, 0X0FDD, 0X100D, 0X103E, 0X1070, 0X10A1, 0X10D3, 0X1105, 0X1137, 0X1169, 0X119C, 0X11CF, 0X1202,0X1236, 0X126A, 0X129E, 0X12D2, 0X1307, 0X133C, 0X1371, 0X13A6, 0X13DC, 0X1412, 0X1448, 0X147E, 0X14B5, 0X14EC, 0X1523, 0X155B,0X1592, 0X15CA, 0X1603, 0X163B, 0X1674, 0X16AD, 0X16E6, 0X1720, 0X1759, 0X1793, 0X17CE, 0X1808, 0X1843, 0X187E, 0X18B9, 0X18F5,0X1930, 0X196C, 0X19A9, 0X19E5, 0X1A22, 0X1A5F, 0X1A9C, 0X1ADA, 0X1B17, 0X1B55, 0X1B94, 0X1BD2, 0X1C11, 0X1C50, 0X1C8F, 0X1CCE,0X1D0E, 0X1D4E, 0X1D8E, 0X1DCE, 0X1E0F, 0X1E50, 0X1E91, 0X1ED2, 0X1F14, 0X1F55, 0X1F97, 0X1FDA, 0X201C, 0X205F, 0X20A2, 0X20E5,0X2128, 0X216C, 0X21B0, 0X21F4, 0X2238, 0X227D, 0X22C2, 0X2307, 0X234C, 0X2391, 0X23D7, 0X241D, 0X2463, 0X24A9, 0X24F0, 0X2536,0X257D, 0X25C5, 0X260C, 0X2654, 0X269B, 0X26E4, 0X272C, 0X2774, 0X27BD, 0X2806, 0X284F, 0X2898, 0X28E2, 0X292C, 0X2976, 0X29C0,0X2A0A, 0X2A55, 0X2AA0, 0X2AEB, 0X2B36, 0X2B81, 0X2BCD, 0X2C19, 0X2C65, 0X2CB1, 0X2CFD, 0X2D4A, 0X2D97, 0X2DE4, 0X2E31, 0X2E7E,0X2ECC, 0X2F1A, 0X2F68, 0X2FB6, 0X3004, 0X3053, 0X30A2, 0X30F1, 0X3140, 0X318F, 0X31DF, 0X322F, 0X327E, 0X32CF, 0X331F, 0X336F,0X33C0, 0X3411, 0X3462, 0X34B3, 0X3504, 0X3556, 0X35A8, 0X35FA, 0X364C, 0X369E, 0X36F0, 0X3743, 0X3796, 0X37E9, 0X383C, 0X388F,0X38E3, 0X3937, 0X398A, 0X39DE, 0X3A33, 0X3A87, 0X3ADB, 0X3B30, 0X3B85, 0X3BDA, 0X3C2F, 0X3C85, 0X3CDA, 0X3D30, 0X3D86, 0X3DDB,0X3E32, 0X3E88, 0X3EDE, 0X3F35, 0X3F8C, 0X3FE3, 0X403A, 0X4091, 0X40E8, 0X4140, 0X4198, 0X41F0, 0X4248, 0X42A0, 0X42F8, 0X4350,0X43A9, 0X4402, 0X445B, 0X44B4, 0X450D, 0X4566, 0X45C0, 0X4619, 0X4673, 0X46CD, 0X4727, 0X4781, 0X47DB, 0X4836, 0X4890, 0X48EB,0X4946, 0X49A1, 0X49FC, 0X4A57, 0X4AB2, 0X4B0E, 0X4B69, 0X4BC5, 0X4C21, 0X4C7D, 0X4CD9, 0X4D35, 0X4D91, 0X4DEE, 0X4E4A, 0X4EA7,0X4F04, 0X4F61, 0X4FBE, 0X501B, 0X5078, 0X50D6, 0X5133, 0X5191, 0X51EF, 0X524C, 0X52AA, 0X5309, 0X5367, 0X53C5, 0X5423, 0X5482,0X54E0, 0X553F, 0X559E, 0X55FD, 0X565C, 0X56BB, 0X571A, 0X577A, 0X57D9, 0X5838, 0X5898, 0X58F8, 0X5958, 0X59B7, 0X5A17, 0X5A77,0X5AD8, 0X5B38, 0X5B98, 0X5BF9, 0X5C59, 0X5CBA, 0X5D1A, 0X5D7B, 0X5DDC, 0X5E3D, 0X5E9E, 0X5EFF, 0X5F60, 0X5FC1, 0X6023, 0X6084,0X60E6, 0X6147, 0X61A9, 0X620B, 0X626C, 0X62CE, 0X6330, 0X6392, 0X63F4, 0X6456, 0X64B8, 0X651B, 0X657D, 0X65DF, 0X6642, 0X66A4,0X6707, 0X676A, 0X67CC, 0X682F, 0X6892, 0X68F5, 0X6958, 0X69BA, 0X6A1E, 0X6A81, 0X6AE4, 0X6B47, 0X6BAA, 0X6C0D, 0X6C71, 0X6CD4,0X6D38, 0X6D9B, 0X6DFE, 0X6E62, 0X6EC6, 0X6F29, 0X6F8D, 0X6FF1, 0X7054, 0X70B8, 0X711C, 0X7180, 0X71E4, 0X7248, 0X72AC, 0X7310,0X7374, 0X73D8, 0X743C, 0X74A0, 0X7504, 0X7568, 0X75CD, 0X7631, 0X7695, 0X76F9, 0X775E, 0X77C2, 0X7826, 0X788B, 0X78EF, 0X7953,0X79B8, 0X7A1C, 0X7A81, 0X7AE5, 0X7B49, 0X7BAE, 0X7C12, 0X7C77, 0X7CDB, 0X7D40, 0X7DA4, 0X7E09, 0X7E6D, 0X7ED2, 0X7F36, 0X7F9B,};the i2s init function:Code:static void MX_I2S2_Init(void){/* USER CODE BEGIN I2S2_Init 0 *//* USER CODE END I2S2_Init 0 *//* USER CODE BEGIN I2S2_Init 1 *//* USER CODE END I2S2_Init 1 */hi2s2.Instance = SPI2;hi2s2.Init.Mode = I2S_MODE_MASTER_TX;hi2s2.Init.Standard = I2S_STANDARD_PHILIPS;hi2s2.Init.DataFormat = I2S_DATAFORMAT_16B;hi2s2.Init.MCLKOutput = I2S_MCLKOUTPUT_ENABLE;hi2s2.Init.AudioFreq = 44100;hi2s2.Init.CPOL = I2S_CPOL_LOW;hi2s2.Init.ClockSource = I2S_CLOCK_PLL;hi2s2.Init.FullDuplexMode = I2S_FULLDUPLEXMODE_DISABLE;if (HAL_I2S_Init(&hi2s2) != HAL_OK){Error_Handler();}/* USER CODE BEGIN I2S2_Init 2 *//* USER CODE END I2S2_Init 2 */}And this is may main function:Code:int main(void){HAL_Init();/* Configure the system clock */SystemClock_Config();/* Initialize all configured peripherals */MX_GPIO_Init();MX_DMA_Init();MX_I2S2_Init();/* USER CODE BEGIN 2 *//* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)sine_table, 2048);}/* USER CODE END 3 */}The Right Channel Analog Output:The Left Channel Analog Output:what is the problem?Do you have any Idea?

author: Bassman59
author_rank: Super Contributor
timestamp: January 30, 2019, 03:56:44 pm
content: Without knowing anything about your system, my guess is your sine table gets used by only the right channel.

author: MarkF
author_rank: Super Contributor
timestamp: January 30, 2019, 04:29:57 pm
content: Is there a problem posting the scope pictures rotated properly?A hardware circuit would be nice.I don't see where you are setting the Left Right Clock (LRCK) pin.You should be sending the sine table twice (once for each channel).Once with LRCK low and again with LRCK high. (See Figure 7 in CS4344 datasheet).https://statics.cirrus.com/pubs/proDatasheet/CS4344-45-48_F2.pdf

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 30, 2019, 04:46:33 pm
content: Go get yourself an EUR 7 logic analyser from Ali / Ebay / China and snif the I2S audio.The magic words are:(on Ali) "24MHz 8ch"(LA software) Sigrok / Pulseview.Miscellaneous:CY7C68013

author: MarkF
author_rank: Super Contributor
timestamp: January 30, 2019, 04:53:20 pm
content: Quote from: MarkF on January 30, 2019, 04:29:57 pmSorry.Thehi2s2.Init.Standard = I2S_STANDARD_PHILIPS;would do the Left Right Clock via Word Select.Do you have the LRCK wired properly?I would think your sine table should have the left and right channel data interleaved?Are you expecting a sine wave on both channels (i.e. both channels are incorrect)?

author: MarkF
author_rank: Super Contributor
timestamp: January 30, 2019, 05:02:13 pm
content: Have you seen this:https://os.mbed.com/forum/mbed/topic/16573/?page=1#comment-45604

author: hamster_nz
author_rank: Super Contributor
timestamp: January 30, 2019, 10:07:52 pm
content: The last parameter on HAL_I2S_Transmit_DMA is a size, not a count:Code:HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)sine_table, 2048);should beCode:HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)sine_table, sizeof(sine_table));That would explain why you are only getting half a sine wave.I have no idea why it isn't sending stereo.... I assume that each sample will need to be doubled up, and a flag set somewhere to indicate it is a stereo stream.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 30, 2019, 10:17:57 pm
content: Well, according to the doc I've just seen, the Size parameter is the number of 16-bit words, so that part seems right.What I don't really get though is that the op calls HAL_I2S_Transmit_DMA() repeatedly whereas it's a non-blocking call. That doesn't look good at first sight.

author: alizare368
author_rank: Regular Contributor
timestamp: January 31, 2019, 01:47:22 pm
content: Hithe pin's are properly connected.there is a waveform on the LRCK pin.this is stm32f401 pin's connection :SDIN to PC3SCLK to PB10LRCK to PB12MCLK to PC6

author: radioactive
author_rank: Regular Contributor
timestamp: February 01, 2019, 10:45:19 pm
content: Quote from: SiliconWizard on January 30, 2019, 10:17:57 pmI was going to mention the same thing after looking at this. Try calling HAL_I2S_Transmit() instead. This will block up-to a timeout period between calls in the while loop. If this produces something close to the desired sine signal, then you probably want to implement an interrupt handler for DMA transfer completed to send new blocks of data. (with the non-blocking call)changed to "up-to a timeout" and part about DMA done interrupt.

author: alizare368
author_rank: Regular Contributor
timestamp: February 02, 2019, 01:20:06 pm
content: HiThank you for help mewhen using the HAL_I2S_Transmit() function both channels work properly.but when using HAL_I2S_Transmit_DMA(). the right channel is ok and left channel is fail.

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 02, 2019, 11:35:22 pm
content: HAL_I2S_Transmit_DMA() is a non-blocking function, it will only prepare and start the DMA transfer of a data block to the I2S peripheral, then return. You're not supposed to call it again immediately after, while a DMA transfer is in progress. You need to use interrupts, either directly or through the HAL callback mechanism: HAL_I2S_TxCpltCallback().I think we partly discussed that in this other thread:https://www.eevblog.com/forum/microcontrollers/cs4344-(24-bit-dac)/in which you were actually using the callback mechanism, but probably had other issues.I'm guessing you're trying to write a simpler working example to get the basic I2S transfer right, which is a good idea, but it looks as though you're running in circles a bit.Use the HAL_I2S_TxCpltCallback() and go from there.There must be a working example in the HAL "Projects" directory? I only have the HAL for the STM32L4 series at the moment (and it doesn't implement the HAL_I2S_xxx() functions, but uses the SAI peripheral directly, and there is an example project such as "SAI_AudioPlay".) So take a look at the HAL sub-directories and you will probably find something to get you started? I must admit ST seems not very prolific with the SAI peripheral. For the L4 series, there are examples for every peripheral but the SAI - there is practically none but one. Maybe it's the same for the F4 series.You should also look at the HAL source code. It helps understanding what the HAL functions do. You can find it in the "Drivers" subdirectory.